32 $connectionName = \Bitrix\Main\Session\Handlers\Table\UserSessionTable::CONNECTION_NAME;
34 $pool = \Bitrix\Main\Application::getInstance()->getConnectionPool();
35 $isConnectionExists = $pool->getConnection($connectionName) !==
null;
36 if (!$isConnectionExists)
38 $pool->cloneConnection(
39 $pool::DEFAULT_CONNECTION_NAME,
44 return $connectionName;
50 (new \Bitrix\Main\Entity\StringField(
'ID'))
53 (new \Bitrix\Main\Entity\DatetimeField(
'TIMESTAMP_X'))
54 ->configureNullable(),
55 (new \Bitrix\Main\Entity\StringField(
'SITE_ID'))
57 ->configureNullable(),
58 (new \Bitrix\Main\Entity\EnumField(
'SENT'))
59 ->configureValues([
'Y',
'N'])
60 ->configureDefaultValue(
'N'),
61 (new \Bitrix\Main\Entity\TextField(
'INFO'))
78 $entity = static::getEntity();
79 $connection = $entity->getConnection();
81 $where = Query::buildFilterSql($entity, $filter);
82 $where = $where ?
'WHERE ' . $where :
'';
86 $connection->getSqlHelper()->quote($entity->getDbTableName()),
90 $res = $connection->query($sql);