How can I close connection Waterline?

112 views
Skip to first unread message

Hagamenon Nicolau

unread,
Dec 27, 2016, 2:28:52 PM12/27/16
to sails.js
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.
Reply all
Reply to author
Forward
0 new messages