Documentation

ConnectionPool

ConnectionPool - connection pool class that manages connections with parameters configured in the settings file .settings.php. The pool has a default connection and additional connections with names. For example, connections to another database. The pool can contain connections for cluster installations. The pool can also be configured to connect to nosql storages.

Queries the following namespace:

Method Description Available from version
Constructor Creates a connection pool object.
cloneConnection Creates new connection based on to the already used connection.
getConnection Returns connection with the database by its name.
getDefaultConnectionType Returns type of connected database.
getSlaveConnection Returns slave connection or null when request can be sent only to master.
ignoreDml Enables DML ignore mode that skips slave stopping queries.
isMasterOnly Returns status of balancing queries (when only master is available).
isSlavePossible Returns status of balancing queries (when slave can be used).
setConnectionParameters Sets parameters for specified connection.
useMasterOnly Sets operation in master-only mode.


© «Bitrix24», 2001-2022
Up