Database: ezcQueryExpressionOracle
[ ]
[ Oracle setup ]
[ ]
[ ]
[ ]
[ ]
Class: ezcQueryExpressionOracle
|
The ezcQueryExpressionOracle class is used to create SQL expression for Oracle. [
source]
This class reimplements the methods that have a different syntax in Oracle.
Parents
ezcQueryExpression
|
--ezcQueryExpressionOracle
Inherited Member Variables
From
ezcQueryExpression:
Method Summary
|
public ezcQueryExpressionOracle |
__construct(
$db )
Constructs an empty ezcQueryExpression |
|
public string |
bitAnd(
$value1, $value2 )
Returns the SQL that performs the bitwise AND on two values. |
|
public string |
bitOr(
$value1, $value2 )
Returns the SQL that performs the bitwise OR on two values. |
|
public string |
bitXor(
$value1, $value2 )
Returns the SQL that performs the bitwise XOR on two values. |
|
public string |
concat(
$... )
Returns a series of strings concatinated |
|
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 |
in(
$column )
Returns the SQL to check if a value is one in a set of given values. |
|
public string |
now(
)
Returns the current system date and time. |
|
public string |
position(
$substr, $value )
Returns the SQL to locate the position of the first occurrence of a substring |
|
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
__construct
ezcQueryExpressionOracle __construct(
$db )
Constructs an empty ezcQueryExpression
Parameters
| Name |
Type |
Description |
$db |
PDO |
|
Redefinition of
bitAnd
string bitAnd(
string
$value1, string
$value2 )
Returns the SQL that performs the bitwise AND on two values.
Parameters
| Name |
Type |
Description |
$value1 |
string |
|
$value2 |
string |
|
Redefinition of
bitOr
string bitOr(
string
$value1, string
$value2 )
Returns the SQL that performs the bitwise OR on two values.
Parameters
| Name |
Type |
Description |
$value1 |
string |
|
$value2 |
string |
|
Redefinition of
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
concat
string concat(
string|array(string)
$... )
Returns a series of strings concatinated
concat() accepts an arbitrary number of parameters. Each parameter must contain an expression or an array with expressions.
Parameters
| Name |
Type |
Description |
$... |
string|array(string) |
strings that will be concatinated. |
Throws
| Class | Description |
ezcQueryVariableException |
if no parameters are provided |
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
in
string in(
mixed
$column )
Returns the SQL to check if a value is one in a set of given values.
in() accepts an arbitrary number of parameters. The first parameter must always specify the value that should be matched against. Successive parameters must contain a logical expression or an array with logical expressions. These expressions will be matched against the first parameter.
Example:
1. $q->select( '*' )->from( 'table' )
2. ->where( $q->expr->in( 'id', 1, 2, 3 ) );
Oracle limits the number of values in a single IN() to 1000. This implementation creates a list of combined IN() expressions to bypass this limitation.
Throws
| Class | Description |
ezcQueryVariableParameterException |
if called with less than two parameters. |
ezcQueryInvalidParameterException |
if the 2nd parameter is an empty array. |
Redefinition of
now
string now(
)
Returns the current system date and time.
Note: The returned timestamp is a SYSDATE. The format can be set after connecting with e.g.: ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS'
Redefinition of
position
string position(
string
$substr, string
$value )
Returns the SQL to locate the position of the first occurrence of a substring
Parameters
| Name |
Type |
Description |
$substr |
string |
|
$value |
string |
|
Redefinition of
subString
string subString(
string
$value, int
$from, [int
$len = null] )
Returns part of a string.
Note: Not SQL92, but common functionality.
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: Mon, 10 Nov 2008