Skip to content

Commit 22525e4

Browse files
authored
Merge pull request #374 from codefori/fix/364_support_long_short_updatable
Support long and short names in updatable prefix
2 parents c0ed131 + 0aa13c6 commit 22525e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/database/table.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ export default class Table {
7070
}
7171

7272
static async isPartitioned(schema: string, name: string): Promise<boolean> {
73-
const sql = `select table_name, partitioned_table from qsys2.sysfiles where table_schema = ? and table_name = ? and partitioned_table is not null and partitioned_table = 'YES'`;
74-
const parameters = [schema, name];
73+
const sql = `select table_name, partitioned_table from qsys2.sysfiles where ((table_schema = ? and table_name = ?) or (system_table_schema = ? and system_table_name = ?)) and partitioned_table is not null and partitioned_table = 'YES'`;
74+
const parameters = [schema, name, schema, name];
7575

7676
const result = await JobManager.runSQL(sql, {parameters});
7777
return result.length > 0;

0 commit comments

Comments
 (0)