lib/dialects/mysql/query/compiler.js
// Compiles a `listTables` query
Compiles a `listTables` query
Compiles a ` listTables ` query
listTables() {
    return {
      sql: `select TABLE_NAME, ENGINE, TABLE_SCHEMA, TABLE_COLLATION, TABLE_COMMENT from information_schema.tables where table_schema = ? and table_type = 'BASE TABLE' order by CREATE_TIME desc`,
      bindings: [this.client.database()],
      output(resp) {
        const out = resp.reduce(function (tables, val) {
          tables[val.TABLE_NAME] = {
            engine: val.ENGINE,
            schema: val.TABLE_SCHEMA,
            collation: val.TABLE_COLLATION,
            comment: val.TABLE_COMMENT,
          };
          return tables;
        }, {});
        return out;
      },
    };
  }
listTables ( ) { return { sql : ` ` , bindings : [ this . client . database ( ) ] , output ( resp ) { const out = resp . reduce ( function ( tables , val ) { tables [ val . TABLE_NAME ] = { engine : val . ENGINE , schema : val . TABLE_SCHEMA , collation : val . TABLE_COLLATION , comment : val . TABLE_COMMENT , } ; return tables ; } , { } ) ; return out ; } , } ; }
Compiles a `listTables` query
Compiles a ` listTables ` query