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 = 'mysql' | |
Champs de données hérités de PdoDriver | |
$name = 'pdo' | |
Champs de données hérités de DatabaseDriver | |
$serverType | |
Fonctions membres protégées | |
getCreateDatabaseQuery ($options, $utf) | |
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) | |
Attributs protégés | |
$nameQuote = '`' | |
$nullDate = '0000-00-00 00:00:00' | |
$utf8mb4 = false | |
$mariadb = false | |
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 = '5.6' |
static | $dbMinMariadb = '10.0' |
static | $defaultCipherSuite |
Attributs protégés statiques hérités de DatabaseDriver | |
static | $connectors = [] |
static | $instances = [] |
static | $dbMinimum |
MySQL database driver supporting PDO based connections
__construct | ( | array | $options | ) |
Constructor.
array | $options | Array of database options with keys: host, user, password, database, select. |
sql_mode to MySql 5.7.8+ default strict mode minus ONLY_FULL_GROUP_BY
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-8.html#mysqld-5-7-8-sql-mode
Références DatabaseDriver\$options, et Symfony\Contracts\Service\__construct().
connect | ( | ) |
Connects to the database if needed.
Implémente DatabaseInterface.
Références $key, $value, DatabaseDriver\getConnection(), MysqlDriver\getVersion(), et null.
Référencé par MysqlDriver\escape(), MysqlDriver\getTableColumns(), MysqlDriver\getTableCreate(), MysqlDriver\getTableKeys(), MysqlDriver\getTableList(), MysqlDriver\getVersion(), MysqlDriver\isConnectionEncryptionSupported(), MysqlDriver\isMariaDb(), MysqlDriver\transactionCommit(), MysqlDriver\transactionRollback(), et MysqlDriver\transactionStart().
convertUtf8mb4QueryToUtf8 | ( | $query | ) |
Automatically downgrade a CREATE TABLE or ALTER TABLE query from utf8mb4 (UTF-8 Multibyte) to plain utf8.
Used when the server doesn't support UTF-8 Multibyte.
string | $query | The query to convert |
Implémente UTF8MB4SupportInterface.
escape | ( | $text, | |
$extra = false |
|||
) |
Method to escape a string for usage in an SQL statement.
Oracle escaping reference: http://www.orafaq.com/wiki/SQL_FAQ#How_does_one_escape_special_characters_when_writing_SQL_queries.3F
SQLite escaping notes: http://www.sqlite.org/faq.html#q14
Method body is as implemented by the Zend Framework
Note: Using query objects with bound variables is preferable to the below.
string | $text | The string to be escaped. |
boolean | $extra | Unused optional parameter to provide extra escaping. |
Implémente DatabaseInterface.
Références $result, $text, et MysqlDriver\connect().
getAlterDbCharacterSet | ( | $dbName | ) |
Return the query string to alter the database character set.
string | $dbName | The database name |
getCollation | ( | ) |
Method to get the database collation in use by sampling a text field of a table in the database.
Implémente DatabaseInterface.
getConnectionCollation | ( | ) |
Method to get the database connection collation in use by sampling a text field of a table in the database.
Implémente DatabaseInterface.
getConnectionEncryption | ( | ) |
Method to get the database encryption details (cipher and protocol) in use.
Implémente DatabaseInterface.
|
protected |
Return the query string to create new Database.
stdClass | $options | Object used to pass user and database name to database driver. This object must have "db_name" and "db_user" set. |
boolean | $utf | True if the database supports the UTF-8 character set. |
Références DatabaseDriver\$options, DatabaseDriver\$utf, et DatabaseDriver\quoteName().
getMinimum | ( | ) |
getNullDate | ( | ) |
Get the null or zero representation of a timestamp for the database driver.
Implémente DatabaseInterface.
Références MysqlDriver\$nullDate.
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, MysqlDriver\connect(), DatabaseDriver\quoteName(), et DatabaseDriver\setQuery().
Référencé par MysqlDriver\insertObject().
getTableCreate | ( | $tables | ) |
Shows the table CREATE statement that creates the given tables.
array | string | $tables | A table name or a list of table names. |
Références $result, MysqlDriver\connect(), DatabaseDriver\quoteName(), et DatabaseDriver\setQuery().
getTableKeys | ( | $table | ) |
Get the details list of keys for a table.
string | $table | The name of the table. |
Implémente DatabaseInterface.
Références MysqlDriver\connect(), DatabaseDriver\quoteName(), et DatabaseDriver\setQuery().
getTableList | ( | ) |
Method to get an array of all tables in the database.
Implémente DatabaseInterface.
Références MysqlDriver\connect(), et DatabaseDriver\setQuery().
getVersion | ( | ) |
Get the version of the database connector.
Implémente DatabaseInterface.
Références $version, MysqlDriver\connect(), et PdoDriver\getOption().
Référencé par MysqlDriver\connect().
hasUTF8mb4Support | ( | ) |
Determine whether the database engine support the UTF-8 Multibyte (utf8mb4) character encoding.
Références MysqlDriver\$utf8mb4.
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 $fields, $id, $key, $query, DatabaseDriver\getQuery(), MysqlDriver\getTableColumns(), PdoDriver\insertid(), null, DatabaseDriver\quote(), DatabaseDriver\quoteName(), et DatabaseDriver\setQuery().
isConnectionEncryptionSupported | ( | ) |
Method to test if the database TLS connections encryption are supported.
Implémente DatabaseInterface.
Références MysqlDriver\connect(), et DatabaseDriver\setQuery().
isMariaDb | ( | ) |
Determine if the database engine is MariaDB.
Références MysqlDriver\$mariadb, et MysqlDriver\connect().
|
static |
Test to see if the MySQL connector is available.
Implémente DatabaseInterface.
Référencé par Database\register().
lockTable | ( | $table | ) |
Locks a table in the database.
string | $table | The name of the table to unlock. |
Implémente DatabaseInterface.
Références $this, DatabaseDriver\quoteName(), et DatabaseDriver\setQuery().
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 MySQL. |
string | $prefix | Not used by MySQL. |
Implémente DatabaseInterface.
Références $this, DatabaseDriver\quoteName(), et DatabaseDriver\setQuery().
select | ( | $database | ) |
Select a database for use.
string | $database | The name of the database to select for use. |
Implémente DatabaseInterface.
transactionCommit | ( | $toSavepoint = false | ) |
Method to commit a transaction.
boolean | $toSavepoint | If true, commit to the last savepoint. |
Implémente DatabaseInterface.
Références MysqlDriver\connect().
transactionRollback | ( | $toSavepoint = false | ) |
Method to roll back a transaction.
boolean | $toSavepoint | If true, rollback to the last savepoint. |
Implémente DatabaseInterface.
Références MysqlDriver\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, MysqlDriver\connect(), PdoDriver\execute(), DatabaseDriver\quoteName(), et DatabaseDriver\setQuery().
unlockTables | ( | ) |
Unlocks tables in the database.
Implémente DatabaseInterface.
Références $this, et DatabaseDriver\setQuery().
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
Référencé par MysqlDriver\isMariaDb().
$name = 'mysql' |
|
protected |
|
protected |
Référencé par MysqlDriver\getNullDate().
|
protected |
Référencé par MysqlDriver\hasUTF8mb4Support().