MssqlSqlHelper class is used to handle MySQL database. Contains specific methods to generate SQL queries, inheriting Bitrix\Main\DB\SqlHelper. They help to generate queries without handling of specific database syntax.

Queries the following namespaces:

Method Description Available from version
addSecondsToDateTime Returns SQL function to add seconds to the interval, indicated in the parameter $from. 14.0.0
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
convertStringField Convert string into object \Bitrix\Main\Type\Date, when string has specific format. 15.0.1
formatDate Returns a database expression for converting value $field according to the value $format. 14.0.0
forSql Prints special symbols in the string to be used in SQL statement.
getAliasLength Returns value of maximum length for alias in the selected statement. 14.5.3
getCharToDateFunction Returns SQL function for converting string value into the Date/time. 14.0.18
getColumnTypeByField Returns type of column according to the scalar field object. 14.5.2
getConcatFunction Returns SQL function for concatenation of database fields and statements.
getConverter Returns callback to be called for a field value on fetch. 15.0.1
getCurrentDateFunction Returns SQL function for getting current date only.
getCurrentDateTimeFunction Returns SQL function for getting current date and time.
getDatetimeToDateFunction Returns SQL function that passes the value $value into the Date/Time database type.
getDateToCharFunction Returns SQL function for converting database fields and statements into the string. 14.0.18
getFieldByColumnType Returns descendant exception from Entity\ScalarField that matches to database type. 14.5.2
getIsNullFunction Returns SQL function to verify database fields and expressions against NULL value.
getLeftQuote Returns an identificator escaping left character. 14.0.0
getLengthFunction Returns SQL function for getting field length or database expression.
getQueryDelimiter Returns special special delimiter for batch processing.
getRightQuote Returns an identificator escaping right character.. 14.0.0
getSubstrFunction Returns SQL function for getting portion of string. 14.0.10
getTopSql Transforms SQL query according to $limit and $offset values. 14.0.0
prepareMerge Builds string for SQL MERGE command for the specified table. 15.5.0
softCastTextToChar Returns expression for string field used during grouping and sorting. 16.5.4

© «Bitrix24», 2001-2023