We have an application in Sailsjs v1.x where we need to connect to databases dynamically based on a request parameter. Since datastores cannot achieve this, we tried the method given here by using Drivers: https://sailsjs.com/documentation/reference/waterline-orm/datastores/driver.
We are using MySQL as our database.
Our question is
- Is there any way to use Models and Waterline queries with Driver rather than writing Native Queries? We would like to take advantage of the waterline ORM as much as possible.
- Any other way to use dynamic database connections with Waterline?