Database: ezcQueryExpressionSqlite
[ ]
[ Oracle_setup ]
[ ]
[ ]
[ ]
[ ]
Class: ezcQueryExpressionSqlite
|
The ezcQueryExpressionSqlite class is used to create SQL expression for SQLite. [
source]
This class reimplements the methods that have a different syntax in SQLite (substr) and contains PHP implementations of functions that are registered with SQLite with it's PDO::sqliteRegisterFunction() method.
Parents
ezcQueryExpression
|
--ezcQueryExpressionSqlite
Member Variables
|
protected array(string=>string) |
$intervalMap
= array( 'SECOND' => 'seconds', 'MINUTE' => 'minutes', 'HOUR' => 'hours', 'DAY' => 'days', 'MONTH' => 'months', 'YEAR' => 'years', )
Contains an interval map from generic intervals to SQLite native intervals. |
Inherited Member Variables
From
ezcQueryExpression:
Method Summary
|
public string |
bitXor(
$value1, $value2 )
Returns the SQL that performs the bitwise XOR on two values. |
|
public string |
dateAdd(
$column, $expr, $type )
Returns the SQL that adds an interval to a timestamp value. |
|
public string |
dateExtract(
$column, $type )
Returns the SQL that extracts parts from a timestamp value. |
|
public string |
dateSub(
$column, $expr, $type )
Returns the SQL that subtracts an interval from a timestamp value. |
|
public string |
now(
)
Returns the current system date and time. |
|
public string |
subString(
$value, $from, [$len = null] )
Returns part of a string. |
|
public string |
unixTimestamp(
$column )
Returns the SQL that converts a timestamp value to a unix timestamp. |
Inherited Methods
From
ezcQueryExpression :
Methods
bitXor
string bitXor(
string
$value1, string
$value2 )
Returns the SQL that performs the bitwise XOR on two values.
Parameters
| Name |
Type |
Description |
$value1 |
string |
|
$value2 |
string |
|
Redefinition of
dateAdd
string dateAdd(
string
$column, numeric
$expr, string
$type )
Returns the SQL that adds an interval to a timestamp value.
Parameters
| Name |
Type |
Description |
$column |
string |
|
$expr |
numeric |
|
$type |
string |
one of SECOND, MINUTE, HOUR, DAY, MONTH, or YEAR |
Redefinition of
dateExtract
string dateExtract(
string
$column, string
$type )
Returns the SQL that extracts parts from a timestamp value.
Parameters
| Name |
Type |
Description |
$column |
string |
|
$type |
string |
one of SECOND, MINUTE, HOUR, DAY, MONTH, or YEAR |
Redefinition of
dateSub
string dateSub(
string
$column, numeric
$expr, string
$type )
Returns the SQL that subtracts an interval from a timestamp value.
Parameters
| Name |
Type |
Description |
$column |
string |
|
$expr |
numeric |
|
$type |
string |
one of SECOND, MINUTE, HOUR, DAY, MONTH, or YEAR |
Redefinition of
now
string now(
)
Returns the current system date and time.
Redefinition of
subString
string subString(
string
$value, int
$from, [int
$len = null] )
Returns part of a string.
Note: Not SQL92, but common functionality. SQLite only supports the 3 parameter variant of this function, so we are using 2^30-1 as artificial length in that case.
Parameters
| Name |
Type |
Description |
$value |
string |
the target $value the string or the string column. |
$from |
int |
extract from this characeter. |
$len |
int |
extract this amount of characters. |
Redefinition of
unixTimestamp
string unixTimestamp(
string
$column )
Returns the SQL that converts a timestamp value to a unix timestamp.
Parameters
| Name |
Type |
Description |
$column |
string |
|
Redefinition of
Last updated: Thu, 01 Nov 2007