string age(
string
$timestamp1, [string
$timestamp2 = null]
)
|
|
PostgreSQLs AGE(<timestamp1> [, <timestamp2>]) function.
Parameters:
string |
$timestamp1: |
timestamp to subtract from NOW() |
string |
$timestamp2: |
optional; if given: subtract arguments |
API Tags:
string date_part(
string
$text, string
$time
)
|
|
PostgreSQLs DATE_PART( <text>, <time> ) function.
Parameters:
string |
$text: |
what to extract |
string |
$time: |
timestamp or interval to extract from |
API Tags:
string matchPattern(
array
$pattern, [string
$operator = null], [string
$field = null]
)
|
|
build a pattern matching string
EXPERIMENTAL
WARNING: this function is experimental and may change signature at any time until labelled as non-experimental
Parameters:
array |
$pattern: |
even keys are strings, odd are patterns (% and _) |
string |
$operator: |
optional pattern operator (LIKE, ILIKE and maybe others in the future) |
string |
$field: |
optional field name that is being matched against (might be required when emulating ILIKE) |
API Tags:
Return: | SQL pattern |
Access: | public |
Returns the md5 sum of a field.
Note: Not SQL92, but common functionality
md5() works with the default PostgreSQL 8 versions.
If you are using PostgreSQL 7.x or older you need to make sure that the digest procedure is installed. If you use RPMS (Redhat and Mandrake) install the postgresql-contrib package. You must then install the procedure by running this shell command:
psql [dbname] < /usr/share/pgsql/contrib/pgcrypto.sql
You should make sure you run this as the postgres user.
Parameters:
API Tags:
Redefinition of:
- Doctrine_Expression_Driver::md5()
- Returns the md5 sum of a field.
return string to call a function to get random value inside an SQL statement
API Tags:
Return: | string to generate float between 0 and 1 |
Access: | public |
string substring(
string
$value, int
$from, [int
$len = null]
)
|
|
Returns part of a string.
Note: Not SQL92, but common functionality.
Parameters:
string |
$value: |
the target $value the string or the string column. |
int |
$from: |
extract from this characeter. |
int |
$len: |
extract this amount of characters. |
API Tags:
Return: | sql that extracts part of a string. |
Access: | public |
Redefinition of:
- Doctrine_Expression_Driver::substring()
- return string to call a function to get a substring inside an SQL statement