PostgresqlExpression
class PostgresqlExpression extends QueryExpression (View source)
Class PostgresqlExpression
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 day 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.
Gets the number of characters in a 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 33
string
concatenate(array $values, string $separator = null)
Concatenates an array of column names or values.
Usage: $query->select($query->concatenate(array('a', 'b')));
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 52
string
current_timestamp()
Gets the current date and time.
at line line 70
string
year(string $date)
Used to get a string to extract year from date column.
Usage: $query->select($query->year($query->quoteName('dateColumn')));
at line line 87
string
month(string $date)
Used to get a string to extract month from date column.
Usage: $query->select($query->month($query->quoteName('dateColumn')));
at line line 104
string
day(string $date)
Used to get a string to extract day from date column.
Usage: $query->select($query->day($query->quoteName('dateColumn')));
at line line 121
string
hour(string $date)
Used to get a string to extract hour from date column.
Usage: $query->select($query->hour($query->quoteName('dateColumn')));
at line line 138
string
minute(string $date)
Used to get a string to extract minute from date column.
Usage: $query->select($query->minute($query->quoteName('dateColumn')));
at line line 155
string
second(string $date)
Used to get a string to extract seconds from date column.
Usage: $query->select($query->second($query->quoteName('dateColumn')));
in QueryExpression at line line 261
integer
length(string $value)
Get the length of a string in bytes.
Note, use 'charLength' to find the number of characters in a string.
Usage: query->where($query->length('a').' > 3');
in QueryExpression at line line 279
string
char_length(string $field, string $operator = null, string $condition = null)
Gets the number of characters in a string.
Note, use 'length' to find the number of bytes in a string.
at line line 171
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