Closes the connection. This can also be called with a connection whose setup failed, which the pool never handed out, and which may already be closed.
The connection to close
Called after connect, once the connection has been registered with the pool.
Override this to attach error handlers or run post-connection setup queries.
If this method throws, the connection is closed with disconnect.
Calling pool.destroy() on the connection from here does not throw, but it does not
close the connection either: the pool only takes ownership once setup is done.
To have a connection that breaks during setup closed, make validate return false
for it: once setup is done, the connection is checked with validate (or the
pool.validate option), and closed if the check fails.
The connection returned by connect
Determine if a connection is still valid or not.
Unless the pool.validate option is set, this is also called once for every new connection
after it has been set up, so it must return true for a connection that was just created.
Abstract Connection Manager
Connection manager which handles pooling & replication. Uses sequelize-pool for pooling
Param: connection