Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZPostgreSQLDB Class Reference

## Public Member Functions
| __construct ( $server, $db, $user, $password)
| isA ()
& | query ( $sql)
| array_query (&$array, $sql, $min=0, $max=-1, $column=false)
| array_query_append (&$array, $sql, $min=0, $max=-1, $column=false)
| query_single (&$row, $sql, $column=false)
| lock ( $table)
| unlock ()
| begin ()
| commit ()
| rollback ()
| nextID ( $table, $field="ID")
& | escapeString ( $str)
| close ()

## Static Public Member Functions
& | fieldName ( $str)

## Public Attributes
| $Database
| database connection More...
| $INI

## Detailed Description

! eZCommon The eZPostgreSQLDB class provides database functions.

eZPostgreSQLDB implementes PostgreSQLDB specific database code.

Definition at line 35 of file ezpostgresqldb.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZPostgreSQLDB::__construct | ( |  | $server,
|  |  | $db,
|  |  | $user,
|  |  | $password
| ) |  |

Definition at line 37 of file ezpostgresqldb.php.

## Member Function Documentation

## ◆ array_query()

eZPostgreSQLDB::array_query | ( | & | $array,
|  |  | $sql,
|  |  | $min = `0`,
|  |  | $max = `-1`,
|  |  | $column = `false`
| ) |  |

Definition at line 79 of file ezpostgresqldb.php.

References array_query_append().

## ◆ array_query_append()

eZPostgreSQLDB::array_query_append | ( | & | $array,
|  |  | $sql,
|  |  | $min = `0`,
|  |  | $max = `-1`,
|  |  | $column = `false`
| ) |  |

Definition at line 85 of file ezpostgresqldb.php.

References $i, $limit, $offset, $result, query(), and eZPBLog\writeWarning().

Referenced by array_query(), and query_single().

## ◆ begin()

eZPostgreSQLDB::begin | ( |  | ) |

Starts a new transaction.

Definition at line 176 of file ezpostgresqldb.php.

References query().

## ◆ close()

eZPostgreSQLDB::close | ( |  | ) |

Closes the database connection.

Definition at line 244 of file ezpostgresqldb.php.

## ◆ commit()

eZPostgreSQLDB::commit | ( |  | ) |

Commits the transaction.

Definition at line 184 of file ezpostgresqldb.php.

References query().

## ◆ escapeString()

& eZPostgreSQLDB::escapeString | ( |  | $str | ) |

Will escape a string so it's ready to be inserted in the database.

Definition at line 225 of file ezpostgresqldb.php.

References $str.

## ◆ fieldName()

& eZPostgreSQLDB::fieldName | ( |  | $str | ) |
| static

Will convert the field name to lower case.

Definition at line 236 of file ezpostgresqldb.php.

References $str.

## ◆ isA()

eZPostgreSQLDB::isA | ( |  | ) |

Returns the driver type.

Definition at line 55 of file ezpostgresqldb.php.

## ◆ lock()

eZPostgreSQLDB::lock | ( |  | $table | ) |

Locks a table

Definition at line 161 of file ezpostgresqldb.php.

References query().

## ◆ nextID()

eZPostgreSQLDB::nextID | ( |  | $table,
|  |  | $field = `"ID"`
| ) |  |

Returns the next value which can be used as a unique index value.

Remeber to lock the table before using this function and inserting the value.

Definition at line 202 of file ezpostgresqldb.php.

References $id, and $result.

## ◆ query()

& eZPostgreSQLDB::query | ( |  | $sql | ) |

Definition at line 60 of file ezpostgresqldb.php.

References $result.

Referenced by array_query_append(), begin(), commit(), lock(), and rollback().

## ◆ query_single()

eZPostgreSQLDB::query_single | ( | & | $row,
|  |  | $sql,
|  |  | $column = `false`
| ) |  |

Same as array_query() but expects to recieve 1 row only (no array), no more no less. $column is the same as in array_query().

Definition at line 149 of file ezpostgresqldb.php.

References $ret, $row, and array_query_append().

## ◆ rollback()

eZPostgreSQLDB::rollback | ( |  | ) |

Cancels the transaction.

Definition at line 192 of file ezpostgresqldb.php.

References query().

## ◆ unlock()

eZPostgreSQLDB::unlock | ( |  | ) |

Releases table locks. Not needed for PostgreSQL.

Definition at line 169 of file ezpostgresqldb.php.

## Member Data Documentation

## ◆ $Database

eZPostgreSQLDB::$Database

database connection

Definition at line 250 of file ezpostgresqldb.php.

## ◆ $INI

eZPostgreSQLDB::$INI

Definition at line 251 of file ezpostgresqldb.php.

The documentation for this class was generated from the following file:

- ezpostgresqldb.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.