PostgreSQL database connection.
PostgreSQL database connection.
Specify postgresql as the connection type when setting up the connection using AnewtDatabase::setup_connection().
The settings accepted by this backend are:
hostname The hostnameusername The usernamepassword The passworddatabase The name of the databaseencoding The character encoding (optional, defaults to UNICODE) __construct($settings) ¶Create a new connection instance (internal use only).
Do not call this method directly; it is for internal use only. See the AnewtDatabase documentation on how to setup and obtain AnewtDatabaseConnection instances.
$settingsAssociative array with connection settings.
is_connected() ¶Check whether the connection is currently open.
True if the connection is open, false otherwise.
last_insert_id($sequence=null) ¶Get the last insert id for PostgreSQL by getting the current value of a sequence.
$sequenceThe name of the sequence.
real_execute_sql($sql) ¶Execute SQL and create an AnewtDatabaseResultSet for a query.
This method is for internal use only and is backend-specific.
$sqlThe SQL query to execute.
escape_boolean($value) ¶Escape a boolean for use in SQL queries.
$valueThe value to escape
The escaped value
escape_string($value) ¶Escape a string for use in SQL queries.
$valueThe value to escape
The escaped value
escape_table_name($value) ¶Escape a table name for use in SQL queries.
$valueThe value to escape
The escaped value
escape_column_name($value) ¶Escape a column name for use in SQL queries.
$valueThe value to escape
The escaped value
real_connect() [protected] ¶Establish a database connection.
real_disconnect() [protected] ¶Disconnect the database connection.
AnewtDatabaseConnection::prepare_executev_fetch_all()AnewtDatabaseConnection::transaction_begin()AnewtDatabaseConnection::transaction_commit()AnewtDatabaseConnection::escape_date()AnewtDatabaseConnection::prepare_execute_fetch_one()AnewtDatabaseConnection::disconnect()AnewtDatabaseConnection::prepare_executev_fetch_one()AnewtDatabaseConnection::prepare()AnewtDatabaseConnection::transaction_rollback()AnewtDatabaseConnection::$queries_executedAnewtDatabaseConnection::$connection_handleAnewtDatabaseConnection::$settingsAnewtDatabaseConnection::prepare_executev()AnewtDatabaseConnection::prepare_execute_fetch_all()AnewtDatabaseConnection::escape_time()AnewtDatabaseConnection::prepare_execute()AnewtDatabaseConnection::create_sql_template()AnewtDatabaseConnection::connect()AnewtDatabaseConnection::escape_datetime()AnewtDatabaseConnection::$n_queries_executed