* 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)
| 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 |