[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Source view] [Print] [Project Stats]
Part of the Joomla Framework Database Package
Copyright: | Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved. |
License: | GNU General Public License version 2 or later; see LICENSE |
File Size: | 845 lines (21 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
MysqlDriver:: (28 methods):
__construct()
connect()
convertUtf8mb4QueryToUtf8()
isSupported()
select()
getAlterDbCharacterSet()
getCollation()
getConnectionCollation()
getConnectionEncryption()
isConnectionEncryptionSupported()
getCreateDatabaseQuery()
getTableCreate()
getTableColumns()
getTableKeys()
getTableList()
getVersion()
getMinimum()
getNullDate()
hasUTF8mb4Support()
isMariaDb()
lockTable()
renameTable()
insertObject()
escape()
unlockTables()
transactionCommit()
transactionRollback()
transactionStart()
Class: MysqlDriver - X-Ref
MySQL database driver supporting PDO based connections__construct(array $options) X-Ref |
Constructor. param: array $options Array of database options with keys: host, user, password, database, select. |
connect() X-Ref |
Connects to the database if needed. return: void Returns void if the database connected successfully. |
convertUtf8mb4QueryToUtf8($query) X-Ref |
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. param: string $query The query to convert return: string The converted query |
isSupported() X-Ref |
Test to see if the MySQL connector is available. return: boolean True on success, false otherwise. |
select($database) X-Ref |
Select a database for use. param: string $database The name of the database to select for use. return: boolean |
getAlterDbCharacterSet($dbName) X-Ref |
Return the query string to alter the database character set. param: string $dbName The database name return: string The query that alter the database query string |
getCollation() X-Ref |
Method to get the database collation in use by sampling a text field of a table in the database. return: string|boolean The collation in use by the database (string) or boolean false if not supported. |
getConnectionCollation() X-Ref |
Method to get the database connection collation in use by sampling a text field of a table in the database. return: string|boolean The collation in use by the database connection (string) or boolean false if not supported. |
getConnectionEncryption() X-Ref |
Method to get the database encryption details (cipher and protocol) in use. return: string The database encryption details. |
isConnectionEncryptionSupported() X-Ref |
Method to test if the database TLS connections encryption are supported. return: boolean Whether the database supports TLS connections encryption. |
getCreateDatabaseQuery($options, $utf) X-Ref |
Return the query string to create new Database. param: stdClass $options Object used to pass user and database name to database driver. This object must have "db_name" and "db_user" set. param: boolean $utf True if the database supports the UTF-8 character set. return: string The query that creates database |
getTableCreate($tables) X-Ref |
Shows the table CREATE statement that creates the given tables. param: array|string $tables A table name or a list of table names. return: array A list of the create SQL for the tables. |
getTableColumns($table, $typeOnly = true) X-Ref |
Retrieves field information about a given table. param: string $table The name of the database table. param: boolean $typeOnly True to only return field types. return: array An array of fields for the database table. |
getTableKeys($table) X-Ref |
Get the details list of keys for a table. param: string $table The name of the table. return: array An array of the column specification for the table. |
getTableList() X-Ref |
Method to get an array of all tables in the database. return: array An array of all the tables in the database. |
getVersion() X-Ref |
Get the version of the database connector. return: string The database connector version. |
getMinimum() X-Ref |
Get the minimum supported database version. return: string |
getNullDate() X-Ref |
Get the null or zero representation of a timestamp for the database driver. return: string |
hasUTF8mb4Support() X-Ref |
Determine whether the database engine support the UTF-8 Multibyte (utf8mb4) character encoding. return: boolean True if the database engine supports UTF-8 Multibyte. |
isMariaDb() X-Ref |
Determine if the database engine is MariaDB. return: boolean |
lockTable($table) X-Ref |
Locks a table in the database. param: string $table The name of the table to unlock. return: $this |
renameTable($oldTable, $newTable, $backup = null, $prefix = null) X-Ref |
Renames a table in the database. param: string $oldTable The name of the table to be renamed param: string $newTable The new name for the table. param: string $backup Not used by MySQL. param: string $prefix Not used by MySQL. return: $this |
insertObject($table, &$object, $key = null) X-Ref |
Inserts a row into a table based on an object's properties. param: string $table The name of the database table to insert into. param: object $object A reference to an object whose public properties match the table fields. param: string $key The name of the primary key. If provided the object property is updated. return: boolean |
escape($text, $extra = false) X-Ref |
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. param: string $text The string to be escaped. param: boolean $extra Unused optional parameter to provide extra escaping. return: string The escaped string. |
unlockTables() X-Ref |
Unlocks tables in the database. return: $this |
transactionCommit($toSavepoint = false) X-Ref |
Method to commit a transaction. param: boolean $toSavepoint If true, commit to the last savepoint. return: void |
transactionRollback($toSavepoint = false) X-Ref |
Method to roll back a transaction. param: boolean $toSavepoint If true, rollback to the last savepoint. return: void |
transactionStart($asSavepoint = false) X-Ref |
Method to initialize a transaction. param: boolean $asSavepoint If true and a transaction is already active, a savepoint will be created. return: void |
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |