Connection pool is a connections holder
См. определение в файле connectionpool.php строка 19
◆ __construct()
◆ cloneConnection()
cloneConnection |
( |
| $name, |
|
|
| $newName, |
|
|
array | $parameters = [] ) |
Creates a new connection based on the supplied one.
- Аргументы
-
string | $name | Copy source. |
string | $newName | Copy target. |
array | $parameters | Parameters to be passed to createConnection method. |
- Возвращает
- Connection
- Исключения
-
ConfigurationException
См. определение в файле connectionpool.php строка 303
◆ createConnection()
createConnection |
( |
| $name, |
|
|
| $parameters ) |
|
protected |
- Аргументы
-
string | $name | |
array | $parameters | |
- Возвращает
- Connection
- Исключения
-
ConfigurationException
См. определение в файле connectionpool.php строка 47
◆ createSlaveConnection()
createSlaveConnection |
( |
| ) |
|
|
protected |
Creates a new slave connection.
- Возвращает
- bool | DB\Connection
См. определение в файле connectionpool.php строка 259
◆ disconnect()
◆ getConnection()
getConnection |
( |
| $name = "" | ) |
|
Returns database connection by its name. Creates new connection if necessary.
- Аргументы
-
string | $name | Connection name. |
- Возвращает
- Connection | DB\Connection|null
См. определение в файле connectionpool.php строка 76
◆ getConnectionParameters()
getConnectionParameters |
( |
string | $name | ) |
|
|
protected |
Searches connection parameters (type, host, db, login and password) by connection name
- Аргументы
-
string | $name | Connection name |
- Возвращает
- array|null
- Исключения
-
Bitrix\Main\ArgumentNullException
См. определение в файле connectionpool.php строка 107
◆ getSlaveConnection()
getSlaveConnection |
( |
| $sql | ) |
|
Returns a slave connection or null if the query should go to the master.
- Аргументы
-
string | $sql | A SQL string. Only SELECT will go to a slave. |
- Возвращает
- DB\Connection|null
См. определение в файле connectionpool.php строка 159
◆ ignoreDml()
In the ignore DML mode a data modification command will not stop next queries going to a slave.
- Аргументы
-
bool | $mode | Ignore subsequent DML or not. |
- Возвращает
- void
См. определение в файле connectionpool.php строка 242
◆ isMasterOnly()
Returns the state of queries balancing (is the master only can be used).
- Возвращает
- bool
См. определение в файле connectionpool.php строка 332
◆ isSlavePossible()
Returns the state of queries balancing (is a slave still can be used).
- Возвращает
- bool
См. определение в файле connectionpool.php строка 322
◆ setConnectionParameters()
setConnectionParameters |
( |
| $name, |
|
|
| $parameters ) |
Sets named connection paramters.
- Аргументы
-
string | $name | Name of the connection. |
array | $parameters | Parameters values. |
- Возвращает
- void
См. определение в файле connectionpool.php строка 143
◆ useMasterOnly()
In the master-only mode all queries will go to the master.
- Аргументы
-
bool | $mode | True starts the mode and false ends. |
- Возвращает
- void
См. определение в файле connectionpool.php строка 224
◆ $connectionParameters
$connectionParameters = [] |
|
protected |
◆ $connections
◆ $ignoreDml
◆ $masterOnly
◆ $modifiedTables
array $modifiedTables = [] |
|
protected |
◆ $slaveConnection
◆ $slavePossible
◆ DEFAULT_CONNECTION_NAME
const DEFAULT_CONNECTION_NAME = "default" |
Объявления и описания членов класса находятся в файле: