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?
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.