0.11 Doctrine_Expression_Driver
Doctrine Expression Driver
Inheritence
Doctrine_Expression_Driver < Doctrine_Connection_Module
Direct Sub-Classes
Method Summary
- pi
- string upper
- string avg
- string md5
- string add
- string between
- string length
- string ltrim
- __call
- string trim
- cos
- string regexp
- string not
- string mul
- string substring
- string rtrim
- string neq
- string in
- string mod
- string now
- string sum
- string isNull
- string sub
- string lte
- sin
- string gte
- string count
- getIdentifiers
- string guid
- string max
- string eq
- getIdentifier
- string round
- string lt
- string gt
- string div
- string lower
- string isNotNull
- string soundex
- concat
- string acos
- integer locate
- string min
Method Details
-
pi()
-
$str literal string or column name (string) upper($str)
upper Returns the string $str with all characters changed to uppercase according to the current character set mapping.
-
$column the column to use (string) avg($column)
Returns the average value of a column
Doctrine_Expression_Driver
-
(string) md5($column)
Returns the md5 sum of a field.
Note: Not SQL92, but common functionality
-
(string) add($args)
Returns the SQL to add values or expressions together.
add() accepts an arbitrary number of parameters. Each parameter must contain a value or an expression or an array with values or expressions.
Example:
$e = $q->expr;$q->select('u.*')
->from('UseDoctrine_Expression_Driver
-
$expression the value to compare to $value1 the lower value to compare with $value2 the higher value to compare with (string) between($expression, $value1, $value2)
Returns SQL that checks if an expression evaluates to a value between two values.
The parameter $expression is checked if it is between $value1 and $value2.
Note: There is a slight difference in the way BETWEEN works on some databases. http://www.w3schools.com/sql/sql_between.asp. If you want complete database independence you shouldDoctrine_Expression_Driver
-
(string) length($column, $expression1, $expression2)
Returns the length of a text field.
-
$str literal string or column name (string) ltrim($str)
ltrim returns the string $str with leading space characters removed
-
__call($m, $a)
for all native RDBMS functions the function name itself is returned
-
$str literal string or column name (string) trim($str)
trim returns the string $str with leading and proceeding space characters removed
-
cos($value)
-
(string) regexp()
regexp returns the regular expression operator
-
(string) not($expression)
Returns the SQL for a logical not.
Example:
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));]]>
Doctrine_Expression_Driver
-
(string) mul($args)
Returns the SQL to multiply values or expressions by eachother.
multiply() accepts an arbitrary number of parameters. Each parameter must contain a value or an expression or an array with values or expressions.
Example:
$e = $q->expr;$q->select('u.*')
->fromDoctrine_Expression_Driver
-
$value an sql string literal or column name/alias $position where to start the substring portion $length the substring portion length (string) substring($value, $from, $len = null, $position, $length)
return string to call a function to get a substring inside an SQL statement
Note: Not SQL92, but common functionality.
SQLite only supports the 2 parameter variant of this functionDoctrine_Expression_Driver
-
$str literal string or column name (string) rtrim($str)
rtrim returns the string $str with proceeding space characters removed
-
$value1 logical expression to compare $value2 logical expression to compare with (string) neq($value1, $value2)
Returns the SQL to check if two values are unequal.
Example:
$q->select('u.*')
->from('User u')
->where($q->expr->neq('id', 1));]]>
Doctrine_Expression_Driver
-
$column the value that should be matched against $values values that will be matched against $column (string) in($column, (string|array(string)) $values)
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 must contain a logical expression or an array with logical expressions. These expressions will be matched again
Doctrine_Expression_Driver
-
(string) mod($expression1, $expression2)
Returns the remainder of the division operation $expression1 / $expression2.
-
(string) now()
Returns the current system date.
-
$column the column to use (string) sum($column)
Returns the total sum of a column
-
$expression the expression that should be compared to null (string) isNull($expression)
Returns SQL that checks if a expression is null.
Example:
$q->select('u.*')
->from('User u')
->where($q->expr->isNull('id'));]]>
Doctrine_Expression_Driver
-
(string) sub($args)
Returns the SQL to subtract values or expressions from eachother.
subtract() accepts an arbitrary number of parameters. Each parameter must contain a value or an expression or an array with values or expressions.
Example:
$e = $q->expr;$q->select('u.*')
->fromDoctrine_Expression_Driver
-
$value1 logical expression to compare $value2 logical expression to compare with (string) lte($value1, $value2)
Returns the SQL to check if one value is less than or equal to another value.
Example:
$q->select('u.*')
->from('User u')
->where($q->expr->lte('id', 1));]]>
Doctrine_Expression_Driver
-
sin($value)
-
$value1 logical expression to compare $value2 logical expression to compare with (string) gte($value1, $value2)
Returns the SQL to check if one value is greater than or equal to another value.
Example:
$q->select('u.*')
->from('User u')
->where($q->expr->gte('id', 1));]]>
Doctrine_Expression_Driver
-
$column the column to use (string) count((string|integer) $column)
Returns the number of rows (without a NULL value) of a column
If a '*' is used instead of a column the number of selected rows is returned.
Doctrine_Expression_Driver
-
getIdentifiers($columns)
-
(string) guid()
Returns global unique identifier
Doctrine_Expression_Driver
-
$column the column to use (string) max($column)
Returns the highest value of a column
Doctrine_Expression_Driver
-
$value1 logical expression to compare $value2 logical expression to compare with (string) eq($value1, $value2)
Returns the SQL to check if two values are equal.
Example:
$q->select('u.*')
->from('User u')
->where($q->expr->eq('id', 1));]]>
Doctrine_Expression_Driver
-
getIdentifier($column)
-
(string) round($column, $decimals, $expression1, $expression2)
Rounds a numeric field to the number of decimals specified.
-
$value1 logical expression to compare $value2 logical expression to compare with (string) lt($value1, $value2)
Returns the SQL to check if one value is less than another value.
Example:
$q->select('u.*')
->from('User u')
->where($q->expr->lt('id', 1));]]>
Doctrine_Expression_Driver
-
$value1 logical expression to compare $value2 logical expression to compare with (string) gt($value1, $value2)
Returns the SQL to check if one value is greater than another value.
Example:
$q->select('u.*')
->from('User u')
->where($q->expr->gt('id', 1));]]>
Doctrine_Expression_Driver
-
(string) div($args)
Returns the SQL to divide values or expressions by eachother.
divide() accepts an arbitrary number of parameters. Each parameter must contain a value or an expression or an array with values or expressions.
Example:
$e = $q->expr;$q->select('u.*')
->from('Doctrine_Expression_Driver
-
$str literal string or column name (string) lower($str)
lower Returns the string $str with all characters changed to lowercase according to the current character set mapping.
-
$expression the expression that should be compared to null (string) isNotNull($expression)
Returns SQL that checks if a expression is not null.
Example:
$q->select('u.*')
->from('User u')
->where($q->expr->isNotNull('id'));]]>
Doctrine_Expression_Driver
-
(string) soundex($value)
soundex Returns a string to call a function to compute the soundex encoding of a string
The string "?000" is returned if the argument is NULL.
Doctrine_Expression_Driver
-
0 strings that will be concatinated. concat((string|array(string)) 0)
Returns a series of strings concatinated
concat() accepts an arbitrary number of parameters. Each parameter must contain an expression or an array with expressions.
-
(string) acos($value)
returns arcus cosine SQL string
-
$str literal string $substr literal string to find (integer) locate($str, $substr)
locate returns the position of the first occurrence of substring $substr in string $str
-
$column the column to use (string) min($column)
Returns the lowest value of a column




Comments (0) [ add comment ]
No Comments
Add Comment