Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques statiques | |
static | isSupported () |
Fonctions membres publiques statiques hérités de PdoDriver | |
static | isSupported () |
Fonctions membres publiques statiques hérités de DatabaseDriver | |
static | getInstance (array $options=[]) |
static | splitSql ($sql) |
Champs de données | |
$name = 'pgsql' | |
Champs de données hérités de PdoDriver | |
$name = 'pdo' | |
Champs de données hérités de DatabaseDriver | |
$serverType | |
Attributs protégés | |
$nameQuote = '"' | |
$nullDate = '1970-01-01 00:00:00' | |
$concat_operator = '||' | |
Attributs protégés hérités de PdoDriver | |
$connection | |
$nameQuote = "'" | |
$nullDate = '0000-00-00 00:00:00' | |
Attributs protégés hérités de DatabaseDriver | |
$name | |
$connection | |
$count = 0 | |
$cursor | |
$executed = false | |
$limit = 0 | |
$nameQuote | |
$nullDate | |
$offset = 0 | |
$options | |
$sql | |
$statement | |
$tablePrefix | |
$utf = true | |
$errorNum = 0 | |
$errorMsg | |
$transactionDepth = 0 | |
$factory | |
$monitor | |
Attributs protégés statiques | |
static | $dbMinimum = '9.4.0' |
Attributs protégés statiques hérités de DatabaseDriver | |
static | $connectors = [] |
static | $instances = [] |
static | $dbMinimum |
Fonctions membres privées | |
getDefaultSchema () | |
Membres hérités additionnels | |
Fonctions membres protégées hérités de PdoDriver | |
prepareStatement (string $query) | |
Fonctions membres protégées hérités de DatabaseDriver | |
dispatchEvent (EventInterface $event) | |
fetchArray () | |
fetchAssoc () | |
fetchObject () | |
freeResult () | |
getAlterDbCharacterSet ($dbName) | |
getCreateDatabaseQuery ($options, $utf) | |
getDatabase () | |
prepareStatement (string $query) | |
quoteNameString ($name, $asSinglePart=false) | |
quoteNameStr ($strArr) | |
PostgreSQL PDO Database Driver
__construct | ( | $options | ) |
Database object constructor
array | $options | List of options used to configure the connection |
Références DatabaseDriver\$options, Symfony\Contracts\Service\__construct(), et null.
connect | ( | ) |
Connects to the database if needed.
Implémente DatabaseInterface.
Références DatabaseDriver\getConnection(), et DatabaseDriver\setQuery().
Référencé par PgsqlDriver\getNamesKey(), PgsqlDriver\getSequenceIsCalled(), PgsqlDriver\getSequenceLastValue(), PgsqlDriver\getTableColumns(), PgsqlDriver\getTableKeys(), PgsqlDriver\renameTable(), PgsqlDriver\transactionCommit(), PgsqlDriver\transactionRollback(), et PgsqlDriver\transactionStart().
decodeBinary | ( | $data | ) |
Replace special placeholder representing binary field with the original string.
string | resource | $data | Encoded string or resource. |
Implémente DatabaseInterface.
Références $data.
getAlterDbCharacterSet | ( | $dbName | ) |
Get the query string to alter the database character set.
string | $dbName | The database name |
Références DatabaseDriver\quote(), et DatabaseDriver\quoteName().
getCollation | ( | ) |
Method to get the database collation in use by sampling a text field of a table in the database.
Implémente DatabaseInterface.
Références DatabaseDriver\loadAssocList(), et DatabaseDriver\setQuery().
getConnectionCollation | ( | ) |
Method to get the database connection collation in use by sampling a text field of a table in the database.
Implémente DatabaseInterface.
Références DatabaseDriver\loadAssocList(), et DatabaseDriver\setQuery().
getConnectionEncryption | ( | ) |
Method to get the database encryption details (cipher and protocol) in use.
Implémente DatabaseInterface.
Références $query, DatabaseDriver\getQuery(), PdoDriver\getVersion(), DatabaseDriver\quoteName(), et DatabaseDriver\setQuery().
getCreateDbQuery | ( | $options, | |
$utf | |||
) |
Get the query string to create new Database in correct PostgreSQL syntax.
object | $options | object coming from "initialise" function to pass user and database name to database driver. |
boolean | $utf | True if the database supports the UTF-8 character set, not used in PostgreSQL "CREATE DATABASE" query. |
Références DatabaseDriver\$options, $query, DatabaseDriver\$utf, DatabaseDriver\quote(), et DatabaseDriver\quoteName().
|
private |
Internal function to get the name of the default schema for the current PostgreSQL connection. That is the schema where tables are created by Joomla.
Références DatabaseDriver\loadResult(), et DatabaseDriver\setQuery().
Référencé par PgsqlDriver\getTableColumns().
getNamesKey | ( | $table, | |
$indKey | |||
) |
Get the list of column names this index indexes.
string | $table | The name of the table. |
string | $indKey | The list of column numbers for the table |
Références $query, PgsqlDriver\connect(), DatabaseDriver\getQuery(), DatabaseDriver\loadResult(), DatabaseDriver\quote(), PgsqlDriver\replacePrefix(), et DatabaseDriver\setQuery().
getRandom | ( | ) |
Generate a random value
Références DatabaseDriver\loadAssoc(), et DatabaseDriver\setQuery().
getSequenceIsCalled | ( | $sequence | ) |
Method to get the is_called attribute of a sequence.
string | $sequence | The name of the sequence. |
Références $query, PgsqlDriver\connect(), DatabaseDriver\getQuery(), DatabaseDriver\loadResult(), DatabaseDriver\quoteName(), et DatabaseDriver\setQuery().
getSequenceLastValue | ( | $sequence | ) |
Method to get the last value of a sequence in the database.
string | $sequence | The name of the sequence. |
Références $query, PgsqlDriver\connect(), DatabaseDriver\getQuery(), DatabaseDriver\loadResult(), DatabaseDriver\quoteName(), et DatabaseDriver\setQuery().
getStringPositionSql | ( | $substring, | |
$string | |||
) |
Get the substring position inside a string
string | $substring | The string being sought |
string | $string | The string/column being searched |
Références $position, DatabaseDriver\loadRow(), et DatabaseDriver\setQuery().
getTableColumns | ( | $table, | |
$typeOnly = true |
|||
) |
Retrieves field information about a given table.
string | $table | The name of the database table. |
boolean | $typeOnly | True to only return field types. |
Implémente DatabaseInterface.
Références $field, $fields, $result, PgsqlDriver\connect(), PgsqlDriver\getDefaultSchema(), DatabaseDriver\loadObjectList(), null, DatabaseDriver\quote(), PgsqlDriver\replacePrefix(), et DatabaseDriver\setQuery().
Référencé par PgsqlDriver\insertObject(), et PgsqlDriver\updateObject().
getTableCreate | ( | $tables | ) |
Shows the table CREATE statement that creates the given tables.
This is unsupported by PostgreSQL.
mixed | $tables | A table name or a list of table names. |
getTableKeys | ( | $table | ) |
Get the details list of keys for a table.
string | $table | The name of the table. |
Implémente DatabaseInterface.
Références PgsqlDriver\connect(), PgsqlDriver\getTableList(), DatabaseDriver\loadObjectList(), DatabaseDriver\quote(), PgsqlDriver\replacePrefix(), et DatabaseDriver\setQuery().
getTableList | ( | ) |
Method to get an array of all tables in the database.
Implémente DatabaseInterface.
Références $query, DatabaseDriver\getQuery(), DatabaseDriver\loadColumn(), DatabaseDriver\quote(), et DatabaseDriver\setQuery().
Référencé par PgsqlDriver\getTableKeys(), PgsqlDriver\getTableSequences(), et PgsqlDriver\renameTable().
getTableSequences | ( | $table | ) |
Get the details list of sequences for a table.
string | $table | The name of the table. |
Références PgsqlDriver\$name, $query, DatabaseDriver\getQuery(), PgsqlDriver\getTableList(), DatabaseDriver\loadObjectList(), DatabaseDriver\quote(), DatabaseDriver\quoteName(), PgsqlDriver\replacePrefix(), et DatabaseDriver\setQuery().
insertObject | ( | $table, | |
& | $object, | ||
$key = null |
|||
) |
Inserts a row into a table based on an object's properties.
string | $table | The name of the database table to insert into. |
object | $object | A reference to an object whose public properties match the table fields. |
string | $key | The name of the primary key. If provided the object property is updated. |
Implémente DatabaseInterface.
Références $columns, $fields, $key, $query, DatabaseDriver\getQuery(), PgsqlDriver\getTableColumns(), null, DatabaseDriver\quoteName(), DatabaseDriver\setQuery(), et PgsqlDriver\sqlValue().
isConnectionEncryptionSupported | ( | ) |
Method to test if the database TLS connections encryption are supported.
Implémente DatabaseInterface.
Références DatabaseDriver\setQuery().
|
static |
Test to see if the PostgreSQL connector is available.
Implémente DatabaseInterface.
lockTable | ( | $tableName | ) |
Locks a table in the database.
string | $tableName | The name of the table to unlock. |
Implémente DatabaseInterface.
Références $this, DatabaseDriver\quoteName(), DatabaseDriver\setQuery(), et PgsqlDriver\transactionStart().
quoteBinary | ( | $data | ) |
Quotes a binary string to database requirements for use in database queries.
string | $data | A binary string to quote. |
Implémente DatabaseInterface.
Références $data.
Renames a table in the database.
string | $oldTable | The name of the table to be renamed |
string | $newTable | The new name for the table. |
string | $backup | Not used by PostgreSQL. |
string | $prefix | Not used by PostgreSQL. |
Implémente DatabaseInterface.
Références $this, PgsqlDriver\connect(), PdoDriver\escape(), DatabaseDriver\getQuery(), PgsqlDriver\getTableList(), DatabaseDriver\loadColumn(), DatabaseDriver\quote(), PgsqlDriver\replacePrefix(), PdoDriver\select(), et DatabaseDriver\setQuery().
replacePrefix | ( | $sql, | |
$prefix = '#__' |
|||
) |
This function replaces a string identifier with the configured table prefix.
string | $sql | The SQL statement to prepare. |
string | $prefix | The table prefix. |
Implémente DatabaseInterface.
Références $prefix, et DatabaseDriver\$sql.
Référencé par PgsqlDriver\getNamesKey(), PgsqlDriver\getTableColumns(), PgsqlDriver\getTableKeys(), PgsqlDriver\getTableSequences(), et PgsqlDriver\renameTable().
showTables | ( | ) |
Returns an array containing database's table list.
Références $query, DatabaseDriver\getQuery(), DatabaseDriver\loadColumn(), DatabaseDriver\quote(), et DatabaseDriver\setQuery().
sqlValue | ( | $columns, | |
$fieldName, | |||
$fieldValue | |||
) |
This function return a field value as a prepared string to be used in a SQL statement.
array | $columns | Array of table's column returned by ::getTableColumns. |
string | $fieldName | The table field's name. |
string | $fieldValue | The variable value to quote and return. |
Références $columns, $fieldValue, $val, elseif, DatabaseDriver\getNullDate(), et DatabaseDriver\quote().
Référencé par PgsqlDriver\insertObject(), et PgsqlDriver\updateObject().
transactionCommit | ( | $toSavepoint = false | ) |
Method to commit a transaction.
boolean | $toSavepoint | If true, commit to the last savepoint. |
Implémente DatabaseInterface.
Références PgsqlDriver\connect().
Référencé par PgsqlDriver\unlockTables().
transactionRollback | ( | $toSavepoint = false | ) |
Method to roll back a transaction.
boolean | $toSavepoint | If true, rollback to the last savepoint. |
Implémente DatabaseInterface.
Références PgsqlDriver\connect(), PdoDriver\execute(), DatabaseDriver\quoteName(), et DatabaseDriver\setQuery().
transactionStart | ( | $asSavepoint = false | ) |
Method to initialize a transaction.
boolean | $asSavepoint | If true and a transaction is already active, a savepoint will be created. |
Implémente DatabaseInterface.
Références DatabaseDriver\$transactionDepth, PgsqlDriver\connect(), PdoDriver\execute(), DatabaseDriver\quoteName(), et DatabaseDriver\setQuery().
Référencé par PgsqlDriver\lockTable().
unlockTables | ( | ) |
Unlocks tables in the database, this command does not exist in PostgreSQL, it is automatically done on commit or rollback.
Implémente DatabaseInterface.
Références $this, et PgsqlDriver\transactionCommit().
updateObject | ( | $table, | |
& | $object, | ||
$key, | |||
$nulls = false |
|||
) |
Updates a row in a table based on an object's properties.
string | $table | The name of the database table to update. |
object | $object | A reference to an object whose public properties match the table fields. |
array | string | $key | The name of the primary key. |
boolean | $nulls | True to update null fields or false to ignore them. |
Implémente DatabaseInterface.
Références $columns, $fields, $key, DatabaseDriver\$statement, $val, PdoDriver\execute(), PgsqlDriver\getTableColumns(), null, DatabaseDriver\quoteName(), DatabaseDriver\setQuery(), et PgsqlDriver\sqlValue().
|
protected |
|
staticprotected |
$name = 'pgsql' |
Référencé par PgsqlDriver\getTableSequences().
|
protected |
|
protected |