\JDatabaseDriverPostgresql
PostgreSQL database driver
Synopsis
class JDatabaseDriverPostgresql
extends JDatabaseDriver
{
- // members
- public $name;
- protected $nameQuote;
- protected $nullDate;
- protected $dbMinimum;
- protected $concat_operator;
- protected JDatabaseDriverPostgresqlQuery $queryObject;
- // Inherited members from JDatabaseDriver
- public $name;
- protected $connection;
- protected $count;
- protected $cursor;
- protected $debug;
- protected $limit;
- protected $log;
- protected $timings;
- protected $callStacks;
- protected $nameQuote;
- protected $nullDate;
- protected $offset;
- protected $options;
- protected $sql;
- protected $tablePrefix;
- protected $utf;
- protected $errorNum;
- protected $errorMsg;
- protected $instances;
- protected $dbMinimum;
- protected $transactionDepth;
- protected $disconnectHandlers;
- // methods
- public void __construct()
- public void __destruct()
- public void connect()
- public void disconnect()
- public string escape()
- public static boolean test()
- public boolean connected()
- public boolean dropTable()
- public integer getAffectedRows()
- public mixed getCollation()
- public integer getNumRows()
- public JDatabaseQuery getQuery()
- public string getTableCreate()
- public array getTableColumns()
- public array getTableKeys()
- public array getTableList()
- public array getTableSequences()
- public string getVersion()
- public integer insertid()
- public JDatabaseDriverPostgresql lockTable()
- public mixed execute()
- public JDatabaseDriverPostgresql renameTable()
- public boolean select()
- public integer setUTF()
- public string sqlValue()
- public void transactionCommit()
- public void transactionRollback()
- public void transactionStart()
- protected mixed fetchArray()
- protected mixed fetchAssoc()
- protected mixed fetchObject()
- protected void freeResult()
- public boolean insertObject()
- public static boolean isSupported()
- public array showTables()
- public integer getStringPositionSQL()
- public float getRandom()
- public string getAlterDbCharacterSet()
- public string getCreateDbQuery()
- public string replacePrefix()
- public void releaseTransactionSavepoint()
- public void transactionSavepoint()
- public JDatabaseDriverPostgresql unlockTables()
- public boolean updateObject()
- // Inherited methods from JDatabaseDriver
- public static array getConnectors()
- public static JDatabaseDriver getInstance()
- public static array splitSql()
- public mixed __call()
- public void __construct()
- public string alterDbCharacterSet()
- public abstract void connect()
- public abstract boolean connected()
- public string createDatabase()
- public abstract void disconnect()
- public void addDisconnectHandler()
- public abstract JDatabaseDriver dropTable()
- public abstract string escape()
- protected abstract mixed fetchArray()
- protected abstract mixed fetchAssoc()
- protected abstract mixed fetchObject()
- protected abstract void freeResult()
- public abstract integer getAffectedRows()
- protected string getAlterDbCharacterSet()
- protected string getCreateDatabaseQuery()
- public abstract mixed getCollation()
- public resource getConnection()
- public integer getCount()
- protected string getDatabase()
- public string getDateFormat()
- public array getLog()
- public array getTimings()
- public array getCallStacks()
- public string getMinimum()
- public string getNullDate()
- public abstract integer getNumRows()
- public string getPrefix()
- public JDatabaseExporter getExporter()
- public JDatabaseImporter getImporter()
- public JDatabaseQuery getQuery()
- public JDatabaseIterator getIterator()
- public abstract array getTableColumns()
- public abstract array getTableCreate()
- public abstract array getTableKeys()
- public abstract array getTableList()
- public boolean getUTFSupport()
- public boolean hasUTFSupport()
- public abstract string getVersion()
- public abstract mixed insertid()
- public boolean insertObject()
- public boolean isMinimumVersion()
- public mixed loadAssoc()
- public mixed loadAssocList()
- public mixed loadColumn()
- public mixed loadNextObject()
- public mixed loadNextRow()
- public mixed loadObject()
- public mixed loadObjectList()
- public mixed loadResult()
- public mixed loadRow()
- public mixed loadRowList()
- public abstract JDatabaseDriver lockTable()
- public string quote()
- public mixed quoteName()
- protected string quoteNameStr()
- public string replacePrefix()
- public abstract JDatabaseDriver renameTable()
- public abstract boolean select()
- public boolean setDebug()
- public JDatabaseDriver setQuery()
- public abstract boolean setUTF()
- public abstract void transactionCommit()
- public abstract void transactionRollback()
- public abstract void transactionStart()
- public void truncateTable()
- public boolean updateObject()
- public abstract mixed execute()
- public abstract JDatabaseDriver unlockTables()
- // Inherited methods from JDatabase
- public mixed query()
- public static array getConnectors()
- public string getErrorMsg()
- public integer getErrorNum()
- public static JDatabaseDriver getInstance()
- public static array splitSql()
- public string stderr()
- public static boolean test()
Hierarchy
Extends
Members
protected
- $callStacks — array
- $concat_operator
—
string
Operator used for concatenation - $connection — resource
- $count — integer
- $cursor — resource
- $dbMinimum
—
string
The minimum supported database version. - $dbMinimum — string
- $debug — boolean
- $disconnectHandlers — array
- $errorMsg — string
- $errorNum — integer
- $instances — array
- $limit — integer
- $log — array
- $nameQuote
—
string
Quote for named objects - $nameQuote — string
- $nullDate
—
string
The null/zero date string - $nullDate — string
- $offset — integer
- $options — array
- $queryObject
—
JDatabaseDriverPostgresqlQuery
JDatabaseDriverPostgresqlQuery object returned by getQuery - $sql — mixed
- $tablePrefix — string
- $timings — array
- $transactionDepth — integer
- $utf — boolean
public
- $name
—
string
The database driver name - $name
—
string
The name of the database driver.
Methods
protected
- fetchArray() — Method to fetch a row from the result set cursor as an array.
- fetchAssoc() — Method to fetch a row from the result set cursor as an associative array.
- fetchObject() — Method to fetch a row from the result set cursor as an object.
- freeResult() — Method to free up the memory used for the result set.
public
- __construct() — Database object constructor
- __destruct() — Database object destructor
- connect() — Connects to the database if needed.
- connected() — Determines if the connection to the server is active.
- disconnect() — Disconnects the database.
- dropTable() — Drops a table from the database.
- escape() — Method to escape a string for usage in an SQL statement.
- execute() — Execute the SQL statement.
- getAffectedRows() — Get the number of affected rows for the previous executed SQL statement.
- getAlterDbCharacterSet() — Get the query string to alter the database character set.
- getCollation() — Method to get the database collation in use by sampling a text field of a table in the database.
- getCreateDbQuery() — Get the query string to create new Database in correct PostgreSQL syntax.
- getNumRows() — Get the number of returned rows for the previous executed SQL statement.
- getQuery() — Get the current or query, or new JDatabaseQuery object.
- getRandom() — Generate a random value
- getStringPositionSQL() — Get the substring position inside a string
- getTableColumns() — Retrieves field information about a given table.
- getTableCreate() — Shows the table CREATE statement that creates the given tables.
- getTableKeys() — Get the details list of keys for a table.
- getTableList() — Method to get an array of all tables in the database.
- getTableSequences() — Get the details list of sequences for a table.
- getVersion() — Get the version of the database connector.
- insertObject() — Inserts a row into a table based on an object's properties.
- insertid() — Method to get the auto-incremented value from the last INSERT statement.
- isSupported() — Test to see if the PostgreSQL connector is available.
- lockTable() — Locks a table in the database.
- releaseTransactionSavepoint() — Method to release a savepoint.
- renameTable() — Renames a table in the database.
- replacePrefix() — This function replaces a string identifier <var>$prefix</var> with the string held is the <var>tablePrefix</var> class variable.
- select() — Selects the database, but redundant for PostgreSQL
- setUTF() — Custom settings for UTF support
- showTables() — Returns an array containing database's table list.
- sqlValue() — This function return a field value as a prepared string to be used in a SQL statement.
- test() — Test to see if the PostgreSQL connector is available
- transactionCommit() — Method to commit a transaction.
- transactionRollback() — Method to roll back a transaction.
- transactionSavepoint() — Method to create a savepoint.
- transactionStart() — Method to initialize a transaction.
- unlockTables() — Unlocks tables in the database, this command does not exist in PostgreSQL, it is automatically done on commit or rollback.
- updateObject() — Updates a row in a table based on an object's properties.
Inherited from JDatabaseDriver
protected
- fetchArray() — Method to fetch a row from the result set cursor as an array.
- fetchAssoc() — Method to fetch a row from the result set cursor as an associative array.
- fetchObject() — Method to fetch a row from the result set cursor as an object.
- freeResult() — Method to free up the memory used for the result set.
- getAlterDbCharacterSet() — Return the query string to alter the database character set.
- getCreateDatabaseQuery() — Return the query string to create new Database.
- getDatabase() — Gets the name of the database used by this conneciton.
- quoteNameStr() — Quote strings coming from quoteName call.
public
- __call() — Magic method to provide method alias support for quote() and quoteName().
- addDisconnectHandler() — Adds a function callable just before disconnecting the database. Parameter of the callable is $this JDatabaseDriver
- alterDbCharacterSet() — Alter database's character set, obtaining query string from protected member.
- connect() — Connects to the database if needed.
- connected() — Determines if the connection to the server is active.
- createDatabase() — Create a new database using information from $options object, obtaining query string from protected member.
- disconnect() — Disconnects the database.
- dropTable() — Drops a table from the database.
- escape() — Escapes a string for usage in an SQL statement.
- execute() — Execute the SQL statement.
- getAffectedRows() — Get the number of affected rows for the previous executed SQL statement.
- getCallStacks() — Get the database driver SQL statement log.
- getCollation() — Method to get the database collation in use by sampling a text field of a table in the database.
- getConnection() — Method that provides access to the underlying database connection. Useful for when you need to call a proprietary method such as postgresql's lo_* methods.
- getConnectors() — Get a list of available database connectors. The list will only be populated with connectors that both the class exists and the static test method returns true. This gives us the ability to have a multitude of connector classes that are self-aware as to whether or not they are able to be used on a given system.
- getCount() — Get the total number of SQL statements executed by the database driver.
- getDateFormat() — Returns a PHP date() function compliant date format for the database driver.
- getExporter() — Gets an exporter class object.
- getImporter() — Gets an importer class object.
- getInstance() — Method to return a JDatabaseDriver instance based on the given options. There are three global options and then the rest are specific to the database driver. The 'driver' option defines which JDatabaseDriver class is used for the connection -- the default is 'mysqli'. The 'database' option determines which database is to be used for the connection. The 'select' option determines whether the connector should automatically select the chosen database.
- getIterator() — Get a new iterator on the current query.
- getLog() — Get the database driver SQL statement log.
- getMinimum() — Get the minimum supported database version.
- getNullDate() — Get the null or zero representation of a timestamp for the database driver.
- getNumRows() — Get the number of returned rows for the previous executed SQL statement.
- getPrefix() — Get the common table prefix for the database driver.
- getQuery() — Get the current query object or a new JDatabaseQuery object.
- getTableColumns() — Retrieves field information about the given tables.
- getTableCreate() — Shows the table CREATE statement that creates the given tables.
- getTableKeys() — Retrieves field information about the given tables.
- getTableList() — Method to get an array of all tables in the database.
- getTimings() — Get the database driver SQL statement log.
- getUTFSupport() — Determine whether or not the database engine supports UTF-8 character encoding.
- getVersion() — Get the version of the database connector
- hasUTFSupport() — Determine whether or not the database engine supports UTF-8 character encoding.
- insertObject() — Inserts a row into a table based on an object's properties.
- insertid() — Method to get the auto-incremented value from the last INSERT statement.
- isMinimumVersion() — Method to check whether the installed database version is supported by the database driver
- loadAssoc() — Method to get the first row of the result set from the database query as an associative array of ['field_name' => 'row_value'].
- loadAssocList() — Method to get an array of the result set rows from the database query where each row is an associative array of ['field_name' => 'row_value']. The array of rows can optionally be keyed by a field name, but defaults to a sequential numeric array.
- loadColumn() — Method to get an array of values from the <var>$offset</var> field in each row of the result set from the database query.
- loadNextObject() — Method to get the next row in the result set from the database query as an object.
- loadNextRow() — Method to get the next row in the result set from the database query as an array.
- loadObject() — Method to get the first row of the result set from the database query as an object.
- loadObjectList() — Method to get an array of the result set rows from the database query where each row is an object. The array of objects can optionally be keyed by a field name, but defaults to a sequential numeric array.
- loadResult() — Method to get the first field of the first row of the result set from the database query.
- loadRow() — Method to get the first row of the result set from the database query as an array. Columns are indexed numerically so the first column in the result set would be accessible via <var>$row[0]</var>, etc.
- loadRowList() — Method to get an array of the result set rows from the database query where each row is an array. The array of objects can optionally be keyed by a field offset, but defaults to a sequential numeric array.
- lockTable() — Locks a table in the database.
- quote() — Quotes and optionally escapes a string to database requirements for use in database queries.
- quoteName() — Wrap an SQL statement identifier name such as column, table or database names in quotes to prevent injection risks and reserved word conflicts.
- renameTable() — Renames a table in the database.
- replacePrefix() — This function replaces a string identifier <var>$prefix</var> with the string held is the <var>tablePrefix</var> class variable.
- select() — Select a database for use.
- setDebug() — Sets the database debugging state for the driver.
- setQuery() — Sets the SQL statement string for later execution.
- setUTF() — Set the connection to use UTF-8 character encoding.
- splitSql() — Splits a string of multiple queries into an array of individual queries.
- transactionCommit() — Method to commit a transaction.
- transactionRollback() — Method to roll back a transaction.
- transactionStart() — Method to initialize a transaction.
- truncateTable() — Method to truncate a table.
- unlockTables() — Unlocks tables in the database.
- updateObject() — Updates a row in a table based on an object's properties.
Inherited from JDatabase
public
- getConnectors() — Get a list of available database connectors. The list will only be populated with connectors that both the class exists and the static test method returns true. This gives us the ability to have a multitude of connector classes that are self-aware as to whether or not they are able to be used on a given system.
- getErrorMsg() — Gets the error message from the database connection.
- getErrorNum() — Gets the error number from the database connection.
- getInstance() — Method to return a JDatabaseDriver instance based on the given options. There are three global options and then the rest are specific to the database driver. The 'driver' option defines which JDatabaseDriver class is used for the connection -- the default is 'mysqli'. The 'database' option determines which database is to be used for the connection. The 'select' option determines whether the connector should automatically select the chosen database.
- query() — Execute the SQL statement.
- splitSql() — Splits a string of multiple queries into an array of individual queries.
- stderr() — Return the most recent error message for the database connector.
- test() — Test to see if the connector is available.