Hi guys,
I created a API using the Sails.js and Waterline.
I need close connection and restart again. For example:
my database will change:
connections: {
gustavomendanha: {
adapter: 'sails-mysql',
host: 'some-host',
user: 'some-user', //optional
password: 'some-pass', //optional
database: dominio.dbname, //optional
pool: true,
connectionLimit: 10,
queueLimit: 0,
waitForConnections: true
}
}
After that, my application will make the operations in datastore, when it finish, my application will change of database, for new database. So, It will close the old connection and open the new connection.
How can I do that?
I was clear?
Thanks.