lib/ezdb/classes/ezpostgresqldb.php
\eZPostgreSQLDB
- Parent(s)
- \eZDBInterface
Constants
BINDING_NO
= 0- Inherited_from
- \eZDBInterface::BINDING_NO
BINDING_NAME
= 1- Inherited_from
- \eZDBInterface::BINDING_NAME
BINDING_ORDERED
= 2- Inherited_from
- \eZDBInterface::BINDING_ORDERED
RELATION_TABLE
= 0- Inherited_from
- \eZDBInterface::RELATION_TABLE
RELATION_SEQUENCE
= 1- Inherited_from
- \eZDBInterface::RELATION_SEQUENCE
RELATION_TRIGGER
= 2- Inherited_from
- \eZDBInterface::RELATION_TRIGGER
RELATION_VIEW
= 3- Inherited_from
- \eZDBInterface::RELATION_VIEW
RELATION_INDEX
= 4- Inherited_from
- \eZDBInterface::RELATION_INDEX
RELATION_TABLE_BIT
= 1- Inherited_from
- \eZDBInterface::RELATION_TABLE_BIT
RELATION_SEQUENCE_BIT
= 2- Inherited_from
- \eZDBInterface::RELATION_SEQUENCE_BIT
RELATION_TRIGGER_BIT
= 4- Inherited_from
- \eZDBInterface::RELATION_TRIGGER_BIT
RELATION_VIEW_BIT
= 8- Inherited_from
- \eZDBInterface::RELATION_VIEW_BIT
RELATION_INDEX_BIT
= 16- Inherited_from
- \eZDBInterface::RELATION_INDEX_BIT
RELATION_NONE
= 0- Inherited_from
- \eZDBInterface::RELATION_NONE
RELATION_MASK
= 31- Inherited_from
- \eZDBInterface::RELATION_MASK
ERROR_MISSING_EXTENSION
= 1- Inherited_from
- \eZDBInterface::ERROR_MISSING_EXTENSION
SERVER_MASTER
= 1- Inherited_from
- \eZDBInterface::SERVER_MASTER
SERVER_SLAVE
= 2- Inherited_from
- \eZDBInterface::SERVER_SLAVE
Properties

$Charset= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$Charset

$ConnectRetries= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$ConnectRetries

$DB= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$DB

$DBConnection= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$DBConnection

$DBWriteConnection= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$DBWriteConnection

$EndTime= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$EndTime

$ErrorMessage= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$ErrorMessage

$ErrorNumber= '0'
0Details- Type
- n/a
- Inherited_from
- \eZDBInterface::$$ErrorNumber

$InputTextCodec= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$InputTextCodec

$IsConnected= 'false'
falseDetails- Type
- n/a
- Inherited_from
- \eZDBInterface::$$IsConnected

$NumQueries= '0'
0Details- Type
- n/a
- Inherited_from
- \eZDBInterface::$$NumQueries

$OutputSQL= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$OutputSQL

$OutputTextCodec= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$OutputTextCodec

$Password= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$Password

$Port= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$Port

$RecordError= 'true'
trueDetails- Type
- n/a
- Inherited_from
- \eZDBInterface::$$RecordError

$Server= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$Server

$SlaveDB= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$SlaveDB

$SlavePassword= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$SlavePassword

$SlavePort= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$SlavePort

$SlaveServer= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$SlaveServer

$SlaveUser= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$SlaveUser

$SocketPath= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$SocketPath

$StartTime= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$StartTime

$TimeTaken= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$TimeTaken

$TransactionCounter= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$TransactionCounter

$TransactionIsValid= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$TransactionIsValid

$UseBuiltinEncoding= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$UseBuiltinEncoding

$UsePersistentConnection= 'false'
falseDetails- Type
- n/a
- Inherited_from
- \eZDBInterface::$$UsePersistentConnection

$User= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$User

$UserSlaveServer= ''
- Type
- n/a
- Inherited_from
- \eZDBInterface::$$UserSlaveServer
Methods

arrayQuery(
$sql, $params
=
array(), $server
=
false
)
:
void| Name | Type | Description |
|---|---|---|
| $sql | ||
| $params | ||
| $server |

attribute(
$name
)
:
void| Name | Type | Description |
|---|---|---|
| $name |

bitAnd(
$arg1, $arg2
)
:
void| Name | Type | Description |
|---|---|---|
| $arg1 | ||
| $arg2 |

bitOr(
$arg1, $arg2
)
:
void| Name | Type | Description |
|---|---|---|
| $arg1 | ||
| $arg2 |

checkCharset(
$charset, $currentCharset
)
:
void| Name | Type | Description |
|---|---|---|
| $charset | ||
| $currentCharset |

createTempTable(
$createTableQuery
=
'', $server
=
self::SERVER_SLAVE
)
:
void| Name | Type | Description |
|---|---|---|
| $createTableQuery | ||
| $server |

dropTempTable(
$dropTableQuery
=
'', $server
=
self::SERVER_SLAVE
)
:
void| Name | Type | Description |
|---|---|---|
| $dropTableQuery | ||
| $server |

dropTempTableList(
$tableList, $server
=
self::SERVER_SLAVE
)
:
void| Name | Type | Description |
|---|---|---|
| $tableList | ||
| $server |

eZDBInterface(
$parameters
)
:
void| Name | Type | Description |
|---|---|---|
| $parameters |

eZTableList(
$server
=
eZDBInterface::SERVER_MASTER
)
:
void| Name | Type | Description |
|---|---|---|
| $server |

generateFailedTransactionStack(
)
:
void
generateFailedTransactionStackEntry(
$stack, $indentCount
)
:
void| Name | Type | Description |
|---|---|---|
| $stack | ||
| $indentCount |

generateSQLINStatement(
int | array $elements, string $columnName
=
'', bool $not
=
false, \$unique $unique
=
true, \$type $type
=
false
)
:
stringThis function can be used to create a SQL IN statement to be used in a WHERE clause:
Inherited from: \eZDBInterface::generateSQLINStatement()WHERE columnName IN ( element1, element2, ... ) By default, the elements that can be submitted as an anonymous array (or an integer value in case of a single element) will just be imploded. Drivers for databases with a limitation of the elements within an IN statement have to reimplement this function. It is also possible to negate the "IN" to a "NOT IN" by using the last parameter of this function.
Usage:
$db =& eZDb::instance(); $db->generateSQLINStatement( array( 2, 5, 43, ) );
| Name | Type | Description |
|---|---|---|
| $elements | int | array | Elements that should (not) be matched by the IN statment as an integer or anonymous array |
| $columnName | string | Column name of the database table the IN statement should be created for |
| $not | bool | Will generate a "NOT IN" ( if set to \c true ) statement instead of an "IN" ( if set to false , default ) |
| $unique | \$unique | Wether or not to make the array unique. Not implemented in this class, but can be used by extending classes (oracle does use it) |
| $type | \$type | The type to cast the array elements to |
| Type | Description |
|---|---|
| string | A string with the correct IN statement like for example "columnName IN ( element1, element2 )" |

generateTraceEntry(
$entry
)
:
void| Name | Type | Description |
|---|---|---|
| $entry |

generateUniqueTempTableName(
$pattern, $randomizeIndex
=
false, $server
=
self::SERVER_SLAVE
)
:
void| Name | Type | Description |
|---|---|---|
| $pattern | ||
| $randomizeIndex | ||
| $server |

hasAttribute(
$name
)
:
void| Name | Type | Description |
|---|---|---|
| $name |

hasRequiredServerVersion(
$minVersion, $name
=
false
)
:
void| Name | Type | Description |
|---|---|---|
| $minVersion | ||
| $name |

implodeWithTypeCast(
string $glue, array $pieces, \$type $type
)
:
stringCasts elements of \a $pieces to type $type and returns them as string separated by $glue.
Inherited from: \eZDBInterface::implodeWithTypeCast()| Name | Type | Description |
|---|---|---|
| $glue | string | The separator. |
| $pieces | array | The array containing the elements. |
| $type | \$type | The type to cast to. |
| Type | Description |
|---|---|
| string |
- Example
- implodeWithTypeCast( ',', $myArray, 'int' )
- Note
- : Use generateSQLINStatement() if you intent to use this for IN statments!

insertFile(
$path, $sqlFile, $usePathType
=
true
)
:
void| Name | Type | Description |
|---|---|---|
| $path | ||
| $sqlFile | ||
| $usePathType |

lastSerialID(
string $table
=
false, string $column
=
'id'
)
:
intReturns the last serial ID generated with an auto increment field.
In this case that means the current value of the sequence assigned $table
| Name | Type | Description |
|---|---|---|
| $table | string | |
| $column | string |
| Type | Description |
|---|---|
| int | The most recent value for the sequence |

prepareSqlQuery(
$fd, $buffer
)
:
void| Name | Type | Description |
|---|---|---|
| $fd | ||
| $buffer |

relationCount(
$relationType
=
eZDBInterface::RELATION_TABLE
)
:
void| Name | Type | Description |
|---|---|---|
| $relationType |

relationList(
$relationType
=
eZDBInterface::RELATION_TABLE
)
:
void| Name | Type | Description |
|---|---|---|
| $relationType |

relationName(
$relationType
)
:
void| Name | Type | Description |
|---|---|---|
| $relationType |

removeRelation(
$relationName, $relationType
)
:
void| Name | Type | Description |
|---|---|---|
| $relationName | ||
| $relationType |

reportQuery(
$class, $sql, $numRows, $timeTaken, $asDebug
=
false
)
:
void| Name | Type | Description |
|---|---|---|
| $class | ||
| $sql | ||
| $numRows | ||
| $timeTaken | ||
| $asDebug |

setIsSQLOutputEnabled(
$enabled
)
:
void| Name | Type | Description |
|---|---|---|
| $enabled |

supportsDefaultValuesInsertion(
)
:
void