MCPcopy
hub / github.com/sequelize/sequelize / tableExistsQuery

Method tableExistsQuery

src/dialects/db2/query-generator.js:178–186  ·  view source on GitHub ↗
(table)

Source from the content-addressed store, hash-verified

176 }
177
178 tableExistsQuery(table) {
179 const tableName = table.tableName || table;
180 // The default schema is the authorization ID of the owner of the plan or package.
181 // https://www.ibm.com/docs/en/db2-for-zos/12?topic=concepts-db2-schemas-schema-qualifiers
182 const schemaName = table.schema || this.sequelize.config.username.toUpperCase();
183
184 // https://www.ibm.com/docs/en/db2-for-zos/11?topic=tables-systables
185 return `SELECT name FROM sysibm.systables WHERE NAME = ${wrapSingleQuote(tableName)} AND CREATOR = ${wrapSingleQuote(schemaName)}`;
186 }
187
188 dropTableQuery(tableName) {
189 const query = 'DROP TABLE <%= table %>';

Callers 1

tableExistsMethod · 0.45

Calls 1

wrapSingleQuoteFunction · 0.70

Tested by

no test coverage detected