Documentation

MysqlCommonSqlHelper

MysqlCommonSqlHelper abstract class used to handle a database. Extensions to the class \Main\DB\SqlHelper.

Queries the following namespace:

Method Description Available from version
addSecondsToDateTime Returns SQL function for adding seconds time interval to $from.
castToChar Returns CAST expression for converted field or string expression. 16.0.10
convertDateField Converts string into object \Bitrix\Main\Type\Date 15.0.1
convertDatetimeField Converts string into object \Bitrix\Main\Type\DateTime. 15.0.1
formatDate Returns database expression for converting $field value according the $format.
getAliasLength Returns maximum length of an alias in a select statement.
getCharToDateFunction Returns SQL function for converting string value into datetime.
getColumnTypeByField Returns a column type according to ScalarField object.
getConcatFunction Returns SQL function for concatenating database fields and expressions.
getConverter Returns callback to be called for a field value on fetch. 15.0.1
getCurrentDateFunction Returns function for getting current date without time.
getCurrentDateTimeFunction Returns function for getting current time and date.
getDatetimeToDateFunction Returns SQL function cast $value to datetime database type.
getDateToCharFunction Returns SQL function for converting database field or expression into string.
getIsNullFunction Returns SQL function for testing database field or expressions against NULL value.
getLeftQuote Returns an identificator escaping left character.
getLengthFunction Returns SQL function for getting length of database field or expression.
getQueryDelimiter Returns database specific query delimiter for batch processing.
getRightQuote Returns an identificator escaping right character.
getTopSql Transforms SQL query according to$limit and $offset limitations.
prepareMerge Builds the strings for the SQL MERGE command for the given table. 15.5.0
softCastTextToChar Returns expression for text field used for grouping or sorting. 16.5.4


© «Bitrix24», 2001-2024
Up