Returns current alive connections number. Warning: The method displays count of active connections at the moment, returned value can become invalid as soon as it returned due async nature of the pool.
Adds connection string to a SQL server with maximum connections count.
Free connections are checked over the time by sending senseless queries. Don't make this time too small - huge overhead for network. Don't make this time too big - you wouldn't able to detect failed connections due server restarting or e.t.c.
Returns date format used in ONE OF sql servers. Warning: This method can be trust only the pool conns are connected to the same sql server. TODO: Make a way to get such configs for particular connection.
Performs several SQL commands on single connection wrapped in a transaction (BEGIN/COMMIT in PostgreSQL). Each command should use '$n' notation to refer params values. Before any command occurs in transaction the local SQL variables is set from vars.
Returns first free connection from the pool.
Awaits all queries to finish and then closes each connection. Calls callback when connections are closed.
If there is no free connection for specified duration while trying to initialize SQL query, then the pool throws ConnTimeoutException exception.
Retrieves SQL result from specified transaction.
Returns current frozen connections number. Warning: The method displays count of active connections at the moment, returned value can become invalid as soon as it returned due async nature of the pool.
Returns true if transaction processing is finished (doesn't matter the actual reason, error or transaction object is invalid, or successful completion).
Returns true if the pool logs all transactions.
Enables/disables logging for all transactions.
Asynchronous way to execute transaction. User can check transaction status by calling isTransactionReady method. When isTransactionReady method returns true, the transaction can be finalized by getTransaction method.
If connection to a SQL server is down, the pool tries to reestablish it every time units returned by the method.
Returns server time zone used in ONE OF sql servers. Warning: This method can be trusted only the pool conns are connected to the same sql server. TODO: Make a way to get such configs for particular connection.
Returns timestamp format used in ONE OF sql servers. Warning: This method can be trust only the pool conns are connected to the same sql server. TODO: Make a way to get such configs for particular connection.
Describes asynchronous connection pool.