| 
				 public 
				
				
				 | 
			#
			__construct( array $options )
				
Database object constructor 
				
Database object constructor Parameters
						$optionsarray- $options List of options used to configure the connectionSince
							12.1
 Overrides | 
		
			| 
				 public 
				
				
				 | 
			#
			__destruct( )
				
Database object destructor 
				
Database object destructor Since
							12.1
 | 
		
			| 
				 public 
				
				
				 | 
			#
			connect( )
				
Connects to the database if needed. 
				
Connects to the database if needed. Returns
						- Returns void if the database connected successfully.
 ThrowsSince
							12.1
 | 
		
			| 
				 public 
				
				
				 | 
			#
			disconnect( )
				
Disconnects the database. 
				
Disconnects the database. Since
							12.1
 | 
		
			| 
				 public 
				string
				
				 | 
			#
			escape( string $text, boolean $extra = false )
				
Method to escape a string for usage in an SQL statement. 
				
Method to escape a string for usage in an SQL statement. Parameters
						$textstring- $text The string to be escaped.$extraboolean- $extra Optional parameter to provide extra escaping.Returns
						string- The escaped string.
 Since
							12.1
 | 
		
			| 
				 public static
				boolean
				
				 | 
			#
			test( )
				
Test to see if the PostgreSQL connector is available 
				
Test to see if the PostgreSQL connector is available Returns
						boolean- True on success, false otherwise.
 Since
							12.1
 Overrides | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			connected( )
				
Determines if the connection to the server is active. 
				
Determines if the connection to the server is active. Returns
						boolean
 Since
							12.1
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			dropTable( string $tableName, boolean $ifExists = true )
				
Drops a table from the database. 
				
Drops a table from the database. Parameters
						$tableNamestring- $tableName The name of the database table to drop.$ifExistsboolean- $ifExists Optionally specify that the table must exist before it is dropped.Returns
						boolean
 ThrowsSince
							12.1
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			getAffectedRows( )
				
Get the number of affected rows by the last INSERT, UPDATE, REPLACE or DELETE
for the previous executed SQL statement. 
				
Get the number of affected rows by the last INSERT, UPDATE, REPLACE or DELETE
for the previous executed SQL statement. Returns
						integer- The number of affected rows in the previous operation
 Since
							12.1
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getCollation( )
				
Method to get the database collation in use by sampling a text field of a
table in the database. 
				
Method to get the database collation in use by sampling a text field of a
table in the database. Returns
						mixed- The collation in use by the database or boolean false if not supported.
 ThrowsSince
							12.1
 | 
		
			| 
				 public 
				string
				
				 | 
			#
			getConnectionCollation( )
				
Method to get the database connection collation, as reported by the driver.
If the connector doesn't support reporting this value please return an empty
string. 
				
Method to get the database connection collation, as reported by the driver.
If the connector doesn't support reporting this value please return an empty
string. Returns
						string
 Overrides | 
		
			| 
				 public 
				integer
				
				 | 
			#
			getNumRows( resource $cur = null )
				
Get the number of returned rows for the previous executed SQL statement. This
command is only valid for statements like SELECT or SHOW that return an actual
result set. To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE
or DELETE query, use getAffectedRows(). 
				
Get the number of returned rows for the previous executed SQL statement. This
command is only valid for statements like SELECT or SHOW that return an actual
result set. To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE
or DELETE query, use getAffectedRows(). Parameters
						$curresource- $cur An optional database cursor resource to extract the row count from.Returns
						integer- The number of returned rows.
 Since
							12.1
 | 
		
			| 
				 public 
				FOFDatabaseQuery | 
			#
			getQuery( boolean $new = false, boolean $asObj = false )
				
Get the current or query, or new FOFDatabaseQuery object. 
				
Get the current or query, or new FOFDatabaseQuery object. Parameters
						$newboolean- $new False to return the last query set, True to return a new FOFDatabaseQuery
object.$asObjboolean- $asObj False to return last query as string, true to get
FOFDatabaseQueryPostgresql object.Returns
						FOFDatabaseQuery - The current query object or a new object extending the FOFDatabaseQuery class.
					 ThrowsSince
							12.1
 Overrides | 
		
			| 
				 public 
				string
				
				 | 
			#
			getTableCreate( mixed $tables )
				
Shows the table CREATE statement that creates the given tables. 
				
Shows the table CREATE statement that creates the given tables. This is unsuported by PostgreSQL. Parameters
						$tablesmixed- $tables A table name or a list of table names.Returns
						string- An empty char because this function is not supported by PostgreSQL.
 ThrowsSince
							12.1
 | 
		
			| 
				 public 
				array
				
				 | 
			#
			getTableColumns( string $table, boolean $typeOnly = true )
				
Retrieves field information about a given table. 
				
Retrieves field information about a given table. Parameters
						$tablestring- $table The name of the database table.$typeOnlyboolean- $typeOnly True to only return field types.Returns
						array- An array of fields for the database table.
 ThrowsSince
							12.1
 | 
		
			| 
				 public 
				array
				
				 | 
			#
			getTableKeys( string $table )
				
Get the details list of keys for a table. 
				
Get the details list of keys for a table. Parameters
						$tablestring- $table The name of the table.Returns
						array- An array of the column specification for the table.
 ThrowsSince
							12.1
 | 
		
			| 
				 public 
				array
				
				 | 
			#
			getTableList( )
				
Method to get an array of all tables in the database. 
				
Method to get an array of all tables in the database. Returns
						array- An array of all the tables in the database.
 ThrowsSince
							12.1
 | 
		
			| 
				 public 
				array
				
				 | 
			#
			getTableSequences( string $table )
				
Get the details list of sequences for a table. 
				
Get the details list of sequences for a table. Parameters
						$tablestring- $table The name of the table.Returns
						array- An array of sequences specification for the table.
 ThrowsSince
							12.1
 | 
		
			| 
				 public 
				string
				
				 | 
			#
			getVersion( )
				
Get the version of the database connector. 
				
Get the version of the database connector. Returns
						string- The database connector version.
 Since
							12.1
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			insertid( )
				
Method to get the auto-incremented value from the last INSERT statement. To
be called after the INSERT statement, it's MANDATORY to have a sequence on every
primary key table. 
				
Method to get the auto-incremented value from the last INSERT statement. To
be called after the INSERT statement, it's MANDATORY to have a sequence on every
primary key table. To get the auto incremented value it's possible to call this function after
INSERT INTO query, or use INSERT INTO with RETURNING clause. Returns
						integer- The value of the auto-increment field from the last inserted row.
 Since
							12.1
 Example
							with insertid() call: $query = $this->getQuery(true)
->insert('jos_dbtest') ->columns('title,start_date,description')
->values("'testTitle2nd','1971-01-01','testDescription2nd'");
$this->setQuery($query); $this->execute(); $id = $this->insertid();with RETURNING clause: $query = $this->getQuery(true)
->insert('jos_dbtest') ->columns('title,start_date,description')
->values("'testTitle2nd','1971-01-01','testDescription2nd'")
->returning('id'); $this->setQuery($query); $id = $this->loadResult();
 
 | 
		
			| 
				 public 
				FOFDatabaseDriverPostgresql | 
			#
			lockTable( string $tableName )
				
Locks a table in the database. 
				
Locks a table in the database. Parameters
						$tableNamestring- $tableName The name of the table to unlock.ReturnsThrowsSince
							12.1
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			execute( )
				
Execute the SQL statement. 
				
Execute the SQL statement. Returns
						mixed- A database cursor resource on success, boolean false on failure.
 ThrowsSince
							12.1
 | 
		
			| 
				 public 
				FOFDatabaseDriverPostgresql | 
			#
			renameTable( string $oldTable, string $newTable, string $backup = null, string $prefix = null )
				
Renames a table in the database. 
				
Renames a table in the database. Parameters
						$oldTablestring- $oldTable The name of the table to be renamed$newTablestring- $newTable The new name for the table.$backupstring- $backup Not used by PostgreSQL.$prefixstring- $prefix Not used by PostgreSQL.ReturnsThrowsSince
							12.1
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			select( string $database )
				
Selects the database, but redundant for PostgreSQL 
				
Selects the database, but redundant for PostgreSQL Parameters
						$databasestring- $database Database name to select.Returns
						boolean- Always true
 ThrowsSince
							12.1
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			setUtf( )
				
Custom settings for UTF support 
				
Custom settings for UTF support Returns
						integer- Zero on success, -1 on failure
 Since
							12.1
 | 
		
			| 
				 public 
				string
				
				 | 
			#
			sqlValue( array $columns, string $field_name, string $field_value )
				
This function return a field value as a prepared string to be used in a SQL
statement. 
				
This function return a field value as a prepared string to be used in a SQL
statement. Parameters
						$columnsarray- $columns Array of table's column returned by ::getTableColumns.$field_namestring- $field_name The table field's name.$field_valuestring- $field_value The variable value to quote and return.Returns
						string- The quoted string.
 Since
							12.1
 | 
		
			| 
				 public 
				
				
				 | 
			#
			transactionCommit( boolean $toSavepoint = false )
				
Method to commit a transaction. 
				
Method to commit a transaction. Parameters
						$toSavepointboolean- $toSavepoint If true, commit to the last savepoint.ThrowsSince
							12.1
 | 
		
			| 
				 public 
				
				
				 | 
			#
			transactionRollback( boolean $toSavepoint = false )
				
Method to roll back a transaction. 
				
Method to roll back a transaction. Parameters
						$toSavepointboolean- $toSavepoint If true, rollback to the last savepoint.ThrowsSince
							12.1
 | 
		
			| 
				 public 
				
				
				 | 
			#
			transactionStart( boolean $asSavepoint = false )
				
Method to initialize a transaction. 
				
Method to initialize a transaction. Parameters
						$asSavepointboolean- $asSavepoint If true and a transaction is already active, a savepoint will be
created.ThrowsSince
							12.1
 | 
		
			| 
				 protected 
				mixed
				
				 | 
			#
			fetchArray( mixed $cursor = null )
				
Method to fetch a row from the result set cursor as an array. 
				
Method to fetch a row from the result set cursor as an array. Parameters
						$cursormixed- $cursor The optional result set cursor from which to fetch the row.Returns
						mixed- Either the next row from the result set or false if there are no more rows.
 Since
							12.1
 | 
		
			| 
				 protected 
				mixed
				
				 | 
			#
			fetchAssoc( mixed $cursor = null )
				
Method to fetch a row from the result set cursor as an associative array. 
				
Method to fetch a row from the result set cursor as an associative array. Parameters
						$cursormixed- $cursor The optional result set cursor from which to fetch the row.Returns
						mixed- Either the next row from the result set or false if there are no more rows.
 Since
							12.1
 | 
		
			| 
				 protected 
				mixed
				
				 | 
			#
			fetchObject( mixed $cursor = null, string $class = 'stdClass' )
				
Method to fetch a row from the result set cursor as an object. 
				
Method to fetch a row from the result set cursor as an object. Parameters
						$cursormixed- $cursor The optional result set cursor from which to fetch the row.$classstring- $class The class name to use for the returned row object.Returns
						mixed- Either the next row from the result set or false if there are no more rows.
 Since
							12.1
 | 
		
			| 
				 protected 
				
				
				 | 
			#
			freeResult( mixed $cursor = null )
				
Method to free up the memory used for the result set. 
				
Method to free up the memory used for the result set. Parameters
						$cursormixed- $cursor The optional result set cursor from which to fetch the row.Since
							12.1
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			insertObject( string $table, object & $object, string $key = null )
				
Inserts a row into a table based on an object's properties. 
				
Inserts a row into a table based on an object's properties. Parameters
						$tablestring- $table The name of the database table to insert into.$objectobject- &$object A reference to an object whose public properties match the table
fields.$keystring- $key The name of the primary key. If provided the object property is updated.Returns
						boolean- True on success.
 ThrowsSince
							12.1
 Overrides | 
		
			| 
				 public static
				boolean
				
				 | 
			#
			isSupported( )
				
Test to see if the PostgreSQL connector is available. 
				
Test to see if the PostgreSQL connector is available. Returns
						boolean- True on success, false otherwise.
 Since
							12.1
 | 
		
			| 
				 public 
				array
				
				 | 
			#
			showTables( )
				
Returns an array containing database's table list. 
				
Returns an array containing database's table list. Returns
						array- The database's table list.
 Since
							12.1
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			getStringPositionSql( string $substring, string $string )
				
Get the substring position inside a string 
				
Get the substring position inside a string Parameters
						$substringstring- $substring The string being sought$stringstring- $string The string/column being searchedReturns
						integer- The position of $substring in $string
 Since
							12.1
 | 
		
			| 
				 public 
				float
				
				 | 
			#
			getRandom( )
				
Generate a random value Returns
						float- The random generated number
 Since
							12.1
 | 
		
			| 
				 public 
				string
				
				 | 
			#
			getAlterDbCharacterSet( string $dbName )
				
Get the query string to alter the database character set. 
				
Get the query string to alter the database character set. Parameters
						$dbNamestring- $dbName The database nameReturns
						string- The query that alter the database query string
 Since
							12.1
 Overrides | 
		
			| 
				 public 
				string
				
				 | 
			#
			getCreateDbQuery( object $options, boolean $utf )
				
Get the query string to create new Database in correct PostgreSQL syntax. 
				
Get the query string to create new Database in correct PostgreSQL syntax. Parameters
						$optionsobject- $options object coming from "initialise" function to pass user and database name
to database driver.$utfboolean- $utf True if the database supports the UTF-8 character set, not used in
PostgreSQL "CREATE DATABASE" query.Returns
						string- The query that creates database, owned by $options['user']
 Since
							12.1
 | 
		
			| 
				 public 
				string
				
				 | 
			#
			replacePrefix( string $query, string $prefix = '#__' )
				
This function replaces a string identifier $prefix with the string
held is the tablePrefix class variable. 
				
This function replaces a string identifier $prefix with the string
held is the tablePrefix class variable. Parameters
						$querystring- $query The SQL statement to prepare.$prefixstring- $prefix The common table prefix.Returns
						string- The processed SQL statement.
 Since
							12.1
 Overrides | 
		
			| 
				 public 
				
				
				 | 
			#
			releaseTransactionSavepoint( string $savepointName )
				
Method to release a savepoint. 
				
Method to release a savepoint. Parameters
						$savepointNamestring- $savepointName Savepoint's name to releaseSince
							12.1
 | 
		
			| 
				 public 
				
				
				 | 
			#
			transactionSavepoint( string $savepointName )
				
Method to create a savepoint. 
				
Method to create a savepoint. Parameters
						$savepointNamestring- $savepointName Savepoint's name to createSince
							12.1
 | 
		
			| 
				 public 
				FOFDatabaseDriverPostgresql | 
			#
			unlockTables( )
				
Unlocks tables in the database, this command does not exist in PostgreSQL, it
is automatically done on commit or rollback. 
				
Unlocks tables in the database, this command does not exist in PostgreSQL, it
is automatically done on commit or rollback. ReturnsThrowsSince
							12.1
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			updateObject( string $table, object & $object, array $key, boolean $nulls = false )
				
Updates a row in a table based on an object's properties. 
				
Updates a row in a table based on an object's properties. Parameters
						$tablestring- $table The name of the database table to update.$objectobject- &$object A reference to an object whose public properties match the table
fields.$keyarray- $key The name of the primary key.$nullsboolean- $nulls True to update null fields or false to ignore them.Returns
						boolean- True on success.
 ThrowsSince
							12.1
 Overrides | 
		
			| 
				 protected 
				integer
				
				 | 
			#
			getErrorNumber( )
				
Return the actual SQL Error number 
				
Return the actual SQL Error number Returns
						integer- The SQL Error number
 Since
							3.4.6
 | 
		
			| 
				 protected 
				string
				
				 | 
			#
			getErrorMessage( string $query )
				
Return the actual SQL Error message 
				
Return the actual SQL Error message Parameters
						$querystring- $query The SQL Query that failsReturns
						string- The SQL Error message
 Since
							3.4.6
 |