|
| __construct ($options) |
|
| connect () |
|
| disconnect () |
|
| escape ($text, $extra=false) |
|
| execute () |
|
| getOption ($key) |
|
| getConnectedQuery () |
|
| getVersion () |
|
| setOption ($key, $value) |
|
| connected () |
|
| getAffectedRows () |
|
| getNumRows ($cursor=null) |
|
| insertid () |
|
| select ($database) |
|
| setQuery ($query, $offset=null, $limit=null, $driverOptions=array()) |
|
| setUtf () |
|
| transactionCommit ($toSavepoint=false) |
|
| transactionRollback ($toSavepoint=false) |
|
| transactionStart ($asSavepoint=false) |
|
| loadNextObject ($class='stdClass') |
|
| loadNextAssoc () |
|
| loadNextRow () |
|
| __sleep () |
|
| __wakeup () |
|
| __call ($method, $args) |
|
| __construct ($options) |
|
| alterDbCharacterSet ($dbName) |
|
| alterTableCharacterSet ($tableName, $rethrow=false) |
|
| connect () |
|
| connected () |
|
| createDatabase ($options, $utf=true) |
|
| __destruct () |
|
| disconnect () |
|
| addDisconnectHandler ($callable) |
|
| dropTable ($table, $ifExists=true) |
|
| escape ($text, $extra=false) |
|
| getAffectedRows () |
|
| getAlterDbCharacterSet ($dbName) |
|
| getAlterTableCharacterSet ($tableName) |
|
| convertUtf8mb4QueryToUtf8 ($query) |
|
| getCollation () |
|
| getConnectionCollation () |
|
| getConnection () |
|
| getCount () |
|
| getDateFormat () |
|
| getLog () |
|
| getTimings () |
|
| getCallStacks () |
|
| getMinimum () |
|
| getNullDate () |
|
| getNumRows ($cursor=null) |
|
| getPrefix () |
|
| getExporter () |
|
| getImporter () |
|
| getName () |
|
| getServerType () |
|
| getQuery ($new=false) |
|
| getIterator ($column=null, $class='stdClass') |
|
| getTableColumns ($table, $typeOnly=true) |
|
| getTableCreate ($tables) |
|
| getTableKeys ($table) |
|
| getTableList () |
|
| getUTFSupport () |
|
| hasUTFSupport () |
|
| hasUTF8mb4Support () |
|
| getVersion () |
|
| insertid () |
|
| insertObject ($table, &$object, $key=null) |
|
| isMinimumVersion () |
|
| loadAssoc () |
|
| loadAssocList ($key=null, $column=null) |
|
| loadColumn ($offset=0) |
|
| loadNextObject ($class='stdClass') |
|
| loadNextRow () |
|
| loadObject ($class='stdClass') |
|
| loadObjectList ($key='', $class='stdClass') |
|
| loadResult () |
|
| loadRow () |
|
| loadRowList ($index=null) |
|
| lockTable ($tableName) |
|
| quote ($text, $escape=true) |
|
| quoteBinary ($data) |
|
| quoteName ($name, $as=null) |
|
| replacePrefix ($sql, $prefix='#__') |
|
| renameTable ($oldTable, $newTable, $backup=null, $prefix=null) |
|
| select ($database) |
|
| setDebug ($level) |
|
| setQuery ($query, $offset=0, $limit=0) |
|
| setUtf () |
|
| transactionCommit ($toSavepoint=false) |
|
| transactionRollback ($toSavepoint=false) |
|
| transactionStart ($asSavepoint=false) |
|
| truncateTable ($table) |
|
| updateObject ($table, &$object, $key, $nulls=false) |
|
| execute () |
|
| unlockTables () |
|
| query () |
|
| getErrorMsg ($escaped=false) |
|
| getErrorNum () |
|
| stderr ($showSQL=false) |
|
Joomla Platform PDO Database Driver Class
3.0.0
◆ __construct()
Constructor.
- Paramètres
-
array | $options | List of options used to configure the connection |
- Depuis
- 3.0.0
Références $options.
◆ __sleep()
PDO does not support serialize
- Renvoie
- array
- Depuis
- 3.1.4
◆ __wakeup()
Wake up after serialization
- Renvoie
- array
- Depuis
- 3.1.4
◆ connect()
Connects to the database if needed.
- Renvoie
- void Returns void if the database connected successfully.
- Depuis
- 3.0.0
- Exceptions
-
Références $format.
◆ connected()
Determines if the connection to the server is active.
- Renvoie
- boolean True if connected to the database engine.
- Depuis
- 3.0.0
Références $limit, $offset, et $query.
◆ disconnect()
Disconnects the database.
- Renvoie
- void
- Depuis
- 3.0.0
Références null.
◆ escape()
escape |
( |
|
$text, |
|
|
|
$extra = false |
|
) |
| |
◆ execute()
Execute the SQL statement.
- Renvoie
- mixed A database cursor resource on success, boolean false on failure.
- Depuis
- 3.0.0
- Exceptions
-
RuntimeException | |
Exception | |
Références $key, $query, et null.
◆ fetchArray()
fetchArray |
( |
|
$cursor = null | ) |
|
|
protected |
Method to fetch a row from the result set cursor as an array.
- Paramètres
-
mixed | $cursor | The optional result set cursor from which to fetch the row. |
- Renvoie
- mixed Either the next row from the result set or false if there are no more rows.
- Depuis
- 3.0.0
◆ fetchAssoc()
fetchAssoc |
( |
|
$cursor = null | ) |
|
|
protected |
Method to fetch a row from the result set cursor as an associative array.
- Paramètres
-
mixed | $cursor | The optional result set cursor from which to fetch the row. |
- Renvoie
- mixed Either the next row from the result set or false if there are no more rows.
- Depuis
- 3.0.0
◆ fetchObject()
fetchObject |
( |
|
$cursor = null , |
|
|
|
$class = 'stdClass' |
|
) |
| |
|
protected |
Method to fetch a row from the result set cursor as an object.
- Paramètres
-
mixed | $cursor | The optional result set cursor from which to fetch the row. |
string | $class | Unused, only necessary so method signature will be the same as parent. |
- Renvoie
- mixed Either the next row from the result set or false if there are no more rows.
- Depuis
- 3.0.0
Références $class.
◆ freeResult()
freeResult |
( |
|
$cursor = null | ) |
|
|
protected |
Method to free up the memory used for the result set.
- Paramètres
-
mixed | $cursor | The optional result set cursor from which to fetch the row. |
- Renvoie
- void
- Depuis
- 3.0.0
Références null.
◆ getAffectedRows()
Get the number of affected rows for the previous executed SQL statement. Only applicable for DELETE, INSERT, or UPDATE statements.
- Renvoie
- integer The number of affected rows.
- Depuis
- 3.0.0
◆ getConnectedQuery()
Get a query to run and verify the database is operational.
- Renvoie
- string The query to check the health of the DB.
- Depuis
- 3.0.1
◆ getErrorMessage()
Return the actual SQL Error message
- Renvoie
- string The SQL Error message
- Depuis
- 3.4.6
◆ getErrorNumber()
Return the actual SQL Error number
- Renvoie
- integer The SQL Error number
- Depuis
- 3.4.6
◆ getNumRows()
getNumRows |
( |
|
$cursor = null | ) |
|
Get the number of returned rows for the previous executed SQL statement. Only applicable for DELETE, INSERT, or UPDATE statements.
- Paramètres
-
resource | $cursor | An optional database cursor resource to extract the row count from. |
- Renvoie
- integer The number of returned rows.
- Depuis
- 3.0.0
Références elseif.
◆ getOption()
Retrieve a PDO database connection attribute
Usage: $db->getOption(PDO::ATTR_CASE);
- Paramètres
-
mixed | $key | One of the PDO::ATTR_* Constants |
- Renvoie
- mixed
3.0.0
Références $key.
◆ getVersion()
Get the version of the database connector.
- Renvoie
- string The database connector version.
- Depuis
- 3.9.0
◆ insertid()
Method to get the auto-incremented value from the last INSERT statement.
- Renvoie
- string The value of the auto-increment field from the last inserted row.
- Depuis
- 3.0.0
◆ isSupported()
Test to see if the PDO extension is available. Override as needed to check for specific PDO Drivers.
- Renvoie
- boolean True on success, false otherwise.
- Depuis
- 3.0.0
Implémente JDatabaseInterface.
◆ loadNextAssoc()
Method to get the next row in the result set from the database query as an array.
- Renvoie
- mixed The result of the query as an array, false if there are no more rows.
- Depuis
- 3.0.0
- Exceptions
-
Références $row, et null.
◆ loadNextObject()
loadNextObject |
( |
|
$class = 'stdClass' | ) |
|
Method to get the next row in the result set from the database query as an object.
- Paramètres
-
string | $class | The class name to use for the returned row object. |
- Renvoie
- mixed The result of the query as an array, false if there are no more rows.
- Depuis
- 3.0.0
- Exceptions
-
- Obsolète:
- 4.0 (CMS) Use getIterator() instead
Références $class, $row, et null.
◆ loadNextRow()
Method to get the next row in the result set from the database query as an array.
- Renvoie
- mixed The result of the query as an array, false if there are no more rows.
- Depuis
- 3.0.0
- Exceptions
-
- Obsolète:
- 4.0 (CMS) Use getIterator() instead
Références $row, et null.
◆ select()
Select a database for use.
- Paramètres
-
string | $database | The name of the database to select for use. |
- Renvoie
- boolean True if the database was successfully selected.
- Depuis
- 3.0.0
- Exceptions
-
◆ setOption()
setOption |
( |
|
$key, |
|
|
|
$value |
|
) |
| |
Sets an attribute on the PDO database handle.
Usage: $db->setOption(PDO::ATTR_CASE, PDO::CASE_UPPER);
- Paramètres
-
integer | $key | One of the PDO::ATTR_* Constants |
mixed | $value | One of the associated PDO Constants related to the particular attribute key. |
- Renvoie
- boolean
3.0.0
Références $key, et $value.
◆ setQuery()
setQuery |
( |
|
$query, |
|
|
|
$offset = null , |
|
|
|
$limit = null , |
|
|
|
$driverOptions = array() |
|
) |
| |
Sets the SQL statement string for later execution.
- Paramètres
-
mixed | $query | The SQL statement to set either as a JDatabaseQuery object or a string. |
integer | $offset | The affected row offset to set. |
integer | $limit | The maximum affected rows to set. |
array | $driverOptions | The optional PDO driver options. |
- Renvoie
- JDatabaseDriver This object to support method chaining.
- Depuis
- 3.0.0
Références $limit, $offset, et $query.
◆ setUtf()
Set the connection to use UTF-8 character encoding.
- Renvoie
- boolean True on success.
- Depuis
- 3.0.0
◆ transactionCommit()
transactionCommit |
( |
|
$toSavepoint = false | ) |
|
Method to commit a transaction.
- Paramètres
-
boolean | $toSavepoint | If true, commit to the last savepoint. |
- Renvoie
- void
- Depuis
- 3.0.0
- Exceptions
-
◆ transactionRollback()
transactionRollback |
( |
|
$toSavepoint = false | ) |
|
Method to roll back a transaction.
- Paramètres
-
boolean | $toSavepoint | If true, rollback to the last savepoint. |
- Renvoie
- void
- Depuis
- 3.0.0
- Exceptions
-
◆ transactionStart()
transactionStart |
( |
|
$asSavepoint = false | ) |
|
Method to initialize a transaction.
- Paramètres
-
boolean | $asSavepoint | If true and a transaction is already active, a savepoint will be created. |
- Renvoie
- void
- Depuis
- 3.0.0
- Exceptions
-
◆ $connection
◆ $executed
◆ $name
◆ $nameQuote
◆ $nullDate
$nullDate = '0000-00-00 00:00:00' |
|
protected |
◆ $prepared
La documentation de cette classe a été générée à partir du fichier suivant :