Search code examples
knex.js

How to fetch list of all databases in knex.js?


knex.raw('SHOW DATABSES') query can work for My SQL clients and using raw a query can be written for SQL server. Is there a uniform query to do it?


Solution

  • No, there is not.

    You need to write your own helper for that or send feature request to knex to discuss more about it. I suppose it could fit to knex.schema.* apis.