- Index
- »
- sql
- »
- SqlConnPool
type
SqlConnPool
src
const class SqlConnPool : Obj
SqlConnPool manages a pool of reusable SQL connections
constructors
make |
It-block construtor |
---|
fields
linger |
Time to linger an idle connection before closing it. |
---|---|
log |
Logger |
maxConns |
Max number of simultaneous connections to allow before blocking threads |
password |
Connection password |
timeout |
Max time to block waiting for a connection before raising TimeoutErr |
uri |
Connection URI |
username |
Connection username |
methods
checkLinger |
Close idle connections that have lingered past the linger timeout. |
---|---|
close |
Close all connections and raise exception on any new executes |
execute |
Allocate a SQL connection inside the given callback. |
isClosed |
Return if |
onClose |
onClose is invoked just before a connection is closed by the pool. |
onOpen |
onOpen is invoked just after a connection is opened by the pool. |