SqlservExpression
class SqlservExpression extends QueryExpression (View source)
Class SqlservExpression
Methods
Concatenates an array of column names or values.
Concatenates an array of column names or values.
Gets the current date and time.
Used to get a string to extract year from date column.
Used to get a string to extract month from date column.
Used to get a string to extract hour from date column.
Used to get a string to extract minute from date column.
Used to get a string to extract seconds from date column.
Get the length of a string in bytes.
Gets the function to determine the length of a character string.
Casts a value to a char.
Details
in QueryExpression at line line 28
__construct(QueryInterface $query)
in QueryExpression at line line 40
static boolean
isExpression(string $value)
isExpression
in QueryExpression at line line 52
mixed|QueryElement
buildExpression(string $name)
buildExpression
in QueryExpression at line line 71
QueryInterface
getQuery()
getQuery
in QueryExpression at line line 83
QueryExpression
setQuery(QueryInterface $query)
setQuery
at line line 46
string
concatenate(array $values, string $separator = null)
Concatenates an array of column names or values.
in QueryExpression at line line 128
string
concat(array $values, string $separator = null)
Concatenates an array of column names or values.
Usage: $query->select($query->concatenate(array('a', 'b')));
at line line 65
string
current_timestamp()
Gets the current date and time.
in QueryExpression at line line 157
string
year(string $date)
Used to get a string to extract year from date column.
Usage: $query->select($query->year($query->quoteName('dateColumn')));
in QueryExpression at line line 174
string
month(string $date)
Used to get a string to extract month from date column.
Usage: $query->select($query->month($query->quoteName('dateColumn')));
in QueryExpression at line line 191
string
day(string $date)
Used to get a string to extract day from date column.
Usage: $query->select($query->day($query->quoteName('dateColumn')));
in QueryExpression at line line 208
string
hour(string $date)
Used to get a string to extract hour from date column.
Usage: $query->select($query->hour($query->quoteName('dateColumn')));
in QueryExpression at line line 225
string
minute(string $date)
Used to get a string to extract minute from date column.
Usage: $query->select($query->minute($query->quoteName('dateColumn')));
in QueryExpression at line line 242
string
second(string $date)
Used to get a string to extract seconds from date column.
Usage: $query->select($query->second($query->quoteName('dateColumn')));
at line line 79
integer
length(string $value)
Get the length of a string in bytes.
at line line 31
string
char_length(string $field, string $operator = null, string $condition = null)
Gets the function to determine the length of a character string.
at line line 95
string
cast_as_char(string $value)
Casts a value to a char.
Ensure that the value is properly quoted before passing to the method.
in QueryExpression at line line 310
string
caseCondition(array $cases, string $else = null)
caseCondition