MCPcopy
hub / github.com/sequelize/sequelize / showAllTables

Method showAllTables

lib/dialects/abstract/query-interface.js:308–318  ·  lib/dialects/abstract/query-interface.js::QueryInterface.showAllTables

* Get all tables in current database * * @param {object} [options] Query options * @param {boolean} [options.raw=true] Run query in raw mode * @param {QueryType} [options.type=QueryType.SHOWTABLE] query type * * @returns {Promise<Array>} * @private

(options)

Source from the content-addressed store, hash-verified

306 * @private
307 */
308 async showAllTables(options) {
309 options = {
310 ...options,
311 raw: true,
312 type: QueryTypes.SHOWTABLES
313 };
314
315 const showTablesSql = this.queryGenerator.showTablesQuery(this.sequelize.config.database);
316 const tableNames = await this.sequelize.query(showTablesSql, options);
317 return _.flatten(tableNames);
318 }
319
320 /**
321 * Describe a table structure

Callers 7

dropAllTablesMethod · 0.95
testFunction · 0.80
dropAllTablesMethod · 0.80
sequelize.test.jsFile · 0.80

Calls 2

showTablesQueryMethod · 0.45
queryMethod · 0.45

Tested by 2

testFunction · 0.64