Bitrix API

CAllDatabase

AbstractYes

Table of Contents

Properties

$arNodes  : mixed
$arQueryDebug  : array<string|int, SqlTrackerQuery>
$bModuleConnection  : mixed
$bNodeConnection  : mixed
$cntQuery  : int
$column_cache  : mixed
$db_Conn  : mixed
$db_Error  : mixed
$db_ErrorSQL  : mixed
$DBHost  : mixed
$DBLogin  : mixed
$DBName  : mixed
$DBPassword  : mixed
$debug  : mixed
$DebugToFile  : mixed
$node_id  : mixed
$obSlave  : CDatabase
$result  : mixed
$ShowSqlStat  : mixed
$sqlTracker  : SqlTracker
$timeQuery  : float
$type  : mixed
$version  : mixed

Methods

addDebugQuery()  : mixed
addDebugTime()  : mixed
CharToDateFunction()  : mixed
Commit()  : mixed
Concat()  : mixed
Connect()  : mixed
CreateIndex()  : mixed
DateFormatToPHP()  : mixed
DateToCharFunction()  : mixed
DDL()  : mixed
DoConnect()  : mixed
FormatDate()  : mixed
ForSql()  : mixed
getConnection()  : mixed
GetDBNodeConnection()  : bool|CDatabase
GetErrorMessage()  : mixed
GetErrorSQL()  : mixed
GetIndexName()  : mixed
GetModuleConnection()  : bool|CDatabase
Returns module database connection.
GetNowDate()  : mixed
GetNowFunction()  : mixed
GetTableFieldsList()  : mixed
GetVersion()  : mixed
IndexExists()  : mixed
InitTableVarsForEdit()  : mixed
IsDate()  : mixed
IsNull()  : mixed
LastID()  : mixed
Length()  : mixed
ParseSqlBatch()  : array<string|int, mixed>
PrepareInsert()  : mixed
PrepareUpdate()  : mixed
PrepareUpdateJoin()  : mixed
Query()  : CDBResult|false
QueryBind()  : mixed
QueryLong()  : mixed
quote()  : mixed
registerAutoload()  : void
Registers database-dependent classes for autoload.
Rollback()  : mixed
RunSQLBatch()  : mixed
showConnectionError()  : mixed
startSqlTracker()  : mixed
StartTransaction()  : mixed
StartUsingMasterOnly()  : mixed
StopUsingMasterOnly()  : mixed
Substr()  : mixed
TableExists()  : mixed
ToChar()  : mixed
ToNumber()  : mixed
TopSql()  : mixed
Update()  : mixed

Properties

$arNodes

public static mixed $arNodes = []

$arQueryDebug

Use \Bitrix\Main\Application::getConnection()->getTracker()->getQueries();

public array<string|int, SqlTrackerQuery> $arQueryDebug = []

$bModuleConnection

public mixed $bModuleConnection

$bNodeConnection

public mixed $bNodeConnection

$cntQuery

Use \Bitrix\Main\Application::getConnection()->getTracker()->getCounter();

public int $cntQuery = 0

$column_cache

public mixed $column_cache = []

$obSlave

public CDatabase $obSlave = \null

$timeQuery

Use \Bitrix\Main\Application::getConnection()->getTracker()->getTime();

public float $timeQuery = 0.0

Methods

addDebugQuery()

public addDebugQuery(mixed $strSql, mixed $exec_time[, mixed $node_id = 0 ]) : mixed
Parameters
$strSql : mixed
$exec_time : mixed
$node_id : mixed = 0

addDebugTime()

public addDebugTime(mixed $index, mixed $exec_time) : mixed
Parameters
$index : mixed
$exec_time : mixed

CharToDateFunction()

public CharToDateFunction(mixed $strValue[, mixed $strType = "FULL" ][, mixed $lang = false ]) : mixed
Parameters
$strValue : mixed
$strType : mixed = "FULL"
$lang : mixed = false

Connect()

public Connect(mixed $DBHost, mixed $DBName, mixed $DBLogin, mixed $DBPassword[, mixed $connectionName = "" ]) : mixed

Use D7 connections.

Parameters
$DBHost : mixed
$DBName : mixed
$DBLogin : mixed
$DBPassword : mixed
$connectionName : mixed = ""

CreateIndex()

public CreateIndex(mixed $indexName, mixed $tableName, mixed $columns[, mixed $unique = false ][, mixed $fulltext = false ]) : mixed
Parameters
$indexName : mixed
$tableName : mixed
$columns : mixed
$unique : mixed = false
$fulltext : mixed = false

DateFormatToPHP()

public static DateFormatToPHP(mixed $format) : mixed
Parameters
$format : mixed

DateToCharFunction()

public DateToCharFunction(mixed $strFieldName[, mixed $strType = "FULL" ][, mixed $lang = false ][, mixed $bSearchInSitesOnly = false ]) : mixed
Parameters
$strFieldName : mixed
$strType : mixed = "FULL"
$lang : mixed = false
$bSearchInSitesOnly : mixed = false

DDL()

public DDL(mixed $strSql[, mixed $bIgnoreErrors = false ][, mixed $error_position = "" ][, mixed $arOptions = [] ]) : mixed
Parameters
$strSql : mixed
$bIgnoreErrors : mixed = false
$error_position : mixed = ""
$arOptions : mixed = []

DoConnect()

public DoConnect([mixed $connectionName = '' ]) : mixed
Parameters
$connectionName : mixed = ''

FormatDate()

public static FormatDate(mixed $strDate[, mixed $format = "DD.MM.YYYY HH:MI:SS" ][, mixed $new_format = "DD.MM.YYYY HH:MI:SS" ]) : mixed
Parameters
$strDate : mixed
$format : mixed = "DD.MM.YYYY HH:MI:SS"
$new_format : mixed = "DD.MM.YYYY HH:MI:SS"

ForSql()

public ForSql(mixed $strValue[, mixed $iMaxLength = 0 ]) : mixed
Parameters
$strValue : mixed
$iMaxLength : mixed = 0

getConnection()

public getConnection() : mixed

GetDBNodeConnection()

public static GetDBNodeConnection(string $node_id[, bool $bIgnoreErrors = false ][, bool $bCheckStatus = true ]) : bool|CDatabase
Parameters
$node_id : string
$bIgnoreErrors : bool = false
$bCheckStatus : bool = true
Return values
bool|CDatabase

GetErrorMessage()

public GetErrorMessage() : mixed

GetErrorSQL()

public GetErrorSQL() : mixed

GetIndexName()

public GetIndexName(mixed $tableName, mixed $arColumns[, mixed $bStrict = false ]) : mixed
Parameters
$tableName : mixed
$arColumns : mixed
$bStrict : mixed = false

GetModuleConnection()

Returns module database connection.

public static GetModuleConnection(string $module_id[, bool $bModuleInclude = false ]) : bool|CDatabase

Can be used only if module supports sharding.

Parameters
$module_id : string
$bModuleInclude : bool = false
Return values
bool|CDatabase

GetNowDate()

public GetNowDate() : mixed

GetNowFunction()

public GetNowFunction() : mixed

GetTableFieldsList()

public GetTableFieldsList(mixed $table) : mixed
Parameters
$table : mixed

GetVersion()

public GetVersion() : mixed

IndexExists()

public IndexExists(mixed $tableName, mixed $arColumns[, mixed $bStrict = false ]) : mixed
Parameters
$tableName : mixed
$arColumns : mixed
$bStrict : mixed = false

InitTableVarsForEdit()

public InitTableVarsForEdit(mixed $tablename[, mixed $strIdentFrom = "str_" ][, mixed $strIdentTo = "str_" ][, mixed $strSuffixFrom = "" ][, mixed $bAlways = false ]) : mixed
Parameters
$tablename : mixed
$strIdentFrom : mixed = "str_"
$strIdentTo : mixed = "str_"
$strSuffixFrom : mixed = ""
$bAlways : mixed = false

IsDate()

public IsDate(mixed $value[, mixed $format = false ][, mixed $lang = false ][, mixed $format_type = "SHORT" ]) : mixed
Parameters
$value : mixed
$format : mixed = false
$lang : mixed = false
$format_type : mixed = "SHORT"

IsNull()

public IsNull(mixed $expression, mixed $result) : mixed
Parameters
$expression : mixed
$result : mixed

Length()

public Length(mixed $field) : mixed
Parameters
$field : mixed

ParseSqlBatch()

public ParseSqlBatch(string $strSql) : array<string|int, mixed>

Use \Bitrix\Main\DB\Connection::parseSqlBatch()

Parameters
$strSql : string
Return values
array<string|int, mixed>

PrepareInsert()

public abstract PrepareInsert(mixed $strTableName, mixed $arFields) : mixed
Parameters
$strTableName : mixed
$arFields : mixed

PrepareUpdate()

public abstract PrepareUpdate(mixed $strTableName, mixed $arFields) : mixed
Parameters
$strTableName : mixed
$arFields : mixed

PrepareUpdateJoin()

public PrepareUpdateJoin(mixed $strTableName, mixed $arFields, mixed $from, mixed $where) : mixed
Parameters
$strTableName : mixed
$arFields : mixed
$from : mixed
$where : mixed

Query()

public Query(string $strSql[, bool $bIgnoreErrors = false ][, string $error_position = "" ][, array<string|int, mixed> $arOptions = [] ]) : CDBResult|false
Parameters
$strSql : string
$bIgnoreErrors : bool = false
$error_position : string = ""
$arOptions : array<string|int, mixed> = []
Return values
CDBResult|false

QueryBind()

public QueryBind(mixed $strSql, mixed $arBinds[, mixed $bIgnoreErrors = false ]) : mixed
Parameters
$strSql : mixed
$arBinds : mixed
$bIgnoreErrors : mixed = false

QueryLong()

public QueryLong(mixed $strSql[, mixed $bIgnoreErrors = false ]) : mixed

Will be removed.

Parameters
$strSql : mixed
$bIgnoreErrors : mixed = false

quote()

public quote(mixed $identifier) : mixed
Parameters
$identifier : mixed

registerAutoload()

Registers database-dependent classes for autoload.

public static registerAutoload([string|null $connectionType = null ]) : void
Parameters
$connectionType : string|null = null

RunSQLBatch()

public RunSQLBatch(mixed $filepath) : mixed
Parameters
$filepath : mixed

showConnectionError()

public static showConnectionError() : mixed

startSqlTracker()

public startSqlTracker() : mixed

StartTransaction()

public StartTransaction() : mixed

StartUsingMasterOnly()

public StartUsingMasterOnly() : mixed

StopUsingMasterOnly()

public StopUsingMasterOnly() : mixed

Substr()

public Substr(mixed $str, mixed $from[, mixed $length = null ]) : mixed
Parameters
$str : mixed
$from : mixed
$length : mixed = null

TableExists()

public TableExists(mixed $tableName) : mixed
Parameters
$tableName : mixed

ToChar()

public ToChar(mixed $expr[, mixed $len = 0 ]) : mixed
Parameters
$expr : mixed
$len : mixed = 0

ToNumber()

public ToNumber(mixed $expr) : mixed
Parameters
$expr : mixed

TopSql()

public TopSql(mixed $strSql, mixed $nTopCount) : mixed
Parameters
$strSql : mixed
$nTopCount : mixed

Update()

public Update(mixed $table, mixed $arFields[, mixed $WHERE = "" ][, mixed $error_position = "" ][, mixed $DEBUG = false ][, mixed $ignore_errors = false ][, mixed $additional_check = true ]) : mixed
Parameters
$table : mixed
$arFields : mixed
$WHERE : mixed = ""
$error_position : mixed = ""
$DEBUG : mixed = false
$ignore_errors : mixed = false
$additional_check : mixed = true

        
On this page

Search results