Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe DatabaseDriver
+ Graphe d'héritage de DatabaseDriver:

Fonctions membres publiques

 __get ($name)
 
 __construct (array $options)
 
 __destruct ()
 
 alterDbCharacterSet ($dbName)
 
 createDatabase ($options, $utf=true)
 
 disconnect ()
 
 dropTable ($table, $ifExists=true)
 
 execute ()
 
 getAffectedRows ()
 
 getConnection ()
 
 getCount ()
 
 getDateFormat ()
 
 getMinimum ()
 
 getName ()
 
 getNumRows ()
 
 getServerType ()
 
 getNullDate ()
 
 getPrefix ()
 
 getExporter ()
 
 getImporter ()
 
 getQuery ($new=false)
 
 getIterator ($column=null, $class=\stdClass::class)
 
 getTableCreate ($tables)
 
 hasUtfSupport ()
 
 insertObject ($table, &$object, $key=null)
 
 isMinimumVersion ()
 
 loadAssoc ()
 
 loadAssocList ($key=null, $column=null)
 
 loadColumn ($offset=0)
 
 loadObject ($class=\stdClass::class)
 
 loadObjectList ($key='', $class=\stdClass::class)
 
 loadResult ()
 
 loadRow ()
 
 loadRowList ($key=null)
 
 q ($text, $escape=true)
 
 quote ($text, $escape=true)
 
 quoteBinary ($data)
 
 decodeBinary ($data)
 
 qn ($name, $as=null)
 
 quoteName ($name, $as=null)
 
 replacePrefix ($sql, $prefix='#__')
 
 getMonitor ()
 
 setMonitor (QueryMonitorInterface $monitor=null)
 
 setQuery ($query, $offset=0, $limit=0)
 
 setUtf ()
 
 truncateTable ($table)
 
 updateObject ($table, &$object, $key, $nulls=false)
 
- Fonctions membres publiques hérités de DatabaseInterface
 connect ()
 
 connected ()
 
 escape ($text, $extra=false)
 
 getCollation ()
 
 getConnectionCollation ()
 
 getConnectionEncryption ()
 
 isConnectionEncryptionSupported ()
 
 getTableColumns ($table, $typeOnly=true)
 
 getTableKeys ($tables)
 
 getTableList ()
 
 getVersion ()
 
 insertid ()
 
 lockTable ($tableName)
 
 renameTable ($oldTable, $newTable, $backup=null, $prefix=null)
 
 select ($database)
 
 transactionCommit ($toSavepoint=false)
 
 transactionRollback ($toSavepoint=false)
 
 transactionStart ($asSavepoint=false)
 
 unlockTables ()
 
- Fonctions membres publiques hérités de DispatcherAwareInterface
 setDispatcher (DispatcherInterface $dispatcher)
 

Fonctions membres publiques statiques

static getInstance (array $options=[])
 
static splitSql ($sql)
 
- Fonctions membres publiques statiques hérités de DatabaseInterface
static isSupported ()
 

Champs de données

 $serverType
 

Fonctions membres protégées

 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

 $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 $connectors = []
 
static $instances = []
 
static $dbMinimum
 

Attributs privés

 $database
 

Description détaillée

Joomla Framework Database Driver Class

Depuis
1.0

Documentation des constructeurs et destructeur

◆ __construct()

__construct ( array  $options)

Constructor.

Paramètres
array$optionsList of options used to configure the connection
Depuis
1.0

Références $options, et null.

◆ __destruct()

__destruct ( )

Destructor.

Depuis
2.0.0

Documentation des fonctions membres

◆ __get()

__get (   $name)

Magic method to access properties of the database driver.

Paramètres
string$nameThe name of the property.
Renvoie
mixed A value if the property name is valid, null otherwise.
Depuis
1.4.0
Obsolète:
3.0 This is a B/C proxy since $this->name was previously public

Références $name, et class.

◆ alterDbCharacterSet()

alterDbCharacterSet (   $dbName)

Alter database's character set.

Paramètres
string$dbNameThe database name that will be altered
Renvoie
boolean|resource
Depuis
2.0.0
Exceptions

Références null.

◆ createDatabase()

createDatabase (   $options,
  $utf = true 
)

Create a new database using information from $options object.

Paramètres
\stdClass$optionsObject used to pass user and database name to database driver. This object must have "db_name" and "db_user" set.
boolean$utfTrue if the database supports the UTF-8 character set.
Renvoie
boolean|resource
Depuis
2.0.0
Exceptions

Implémente DatabaseInterface.

Références $options, et null.

◆ decodeBinary()

decodeBinary (   $data)

Replace special placeholder representing binary field with the original string.

Paramètres
string | resource$dataEncoded string or resource.
Renvoie
string The original string.
Depuis
1.7.0

Implémente DatabaseInterface.

Références $data.

◆ disconnect()

disconnect ( )

Disconnects the database.

Renvoie
void
Depuis
2.0.0

Implémente DatabaseInterface.

Références $this, et null.

Référencé par SqliteDriver\__destruct(), et PdoDriver\__destruct().

◆ dispatchEvent()

dispatchEvent ( EventInterface  $event)
protected

Dispatch an event.

Paramètres
EventInterface$eventThe event to dispatch
Renvoie
void
Depuis
2.0.0

Références Joomla\CMS\Application\getDispatcher(), et EventInterface\getName().

Référencé par PdoDriver\connect().

◆ dropTable()

dropTable (   $table,
  $ifExists = true 
)

Drops a table from the database.

Paramètres
string$tableThe name of the database table to drop.
boolean$ifExistsOptionally specify that the table must exist before it is dropped.
Renvoie
$this
Depuis
2.0.0
Exceptions

Implémente DatabaseInterface.

Références $this.

◆ execute()

execute ( )

Execute the SQL statement.

Renvoie
boolean
Depuis
2.0.0
Exceptions

Implémente DatabaseInterface.

Références $key, $sql, et null.

◆ fetchArray()

fetchArray ( )
protected

Method to fetch a row from the result set cursor as an array.

Renvoie
mixed Either the next row from the result set or false if there are no more rows.
Depuis
1.0

◆ fetchAssoc()

fetchAssoc ( )
protected

Method to fetch a row from the result set cursor as an associative array.

Renvoie
mixed Either the next row from the result set or false if there are no more rows.
Depuis
1.0

◆ fetchObject()

fetchObject ( )
protected

Method to fetch a row from the result set cursor as an object.

Note, the fetch mode should be configured before calling this method using StatementInterface::setFetchMode().

Renvoie
mixed Either the next row from the result set or false if there are no more rows.
Depuis
1.0

◆ freeResult()

freeResult ( )
protected

Method to free up the memory used for the result set.

Renvoie
void
Depuis
1.0

Référencé par MysqliDriver\executeUnpreparedQuery().

◆ getAffectedRows()

getAffectedRows ( )

Get the number of affected rows for the previous executed SQL statement.

Renvoie
integer The number of affected rows in the previous operation
Depuis
2.0.0

Implémente DatabaseInterface.

◆ getAlterDbCharacterSet()

getAlterDbCharacterSet (   $dbName)
protected

Return the query string to alter the database character set.

Paramètres
string$dbNameThe database name
Renvoie
string The query that alter the database query string
Depuis
1.6.0

◆ getConnection()

getConnection ( )

Method that provides access to the underlying database connection.

Renvoie
resource The underlying database connection resource.
Depuis
1.0

Implémente DatabaseInterface.

Référencé par PgsqlDriver\connect(), et MysqlDriver\connect().

◆ getCount()

getCount ( )

Get the total number of SQL statements executed by the database driver.

Renvoie
integer
Depuis
1.0

Implémente DatabaseInterface.

Références $count.

◆ getCreateDatabaseQuery()

getCreateDatabaseQuery (   $options,
  $utf 
)
protected

Return the query string to create new Database.

Paramètres
stdClass$optionsObject used to pass user and database name to database driver. This object must have "db_name" and "db_user" set.
boolean$utfTrue if the database supports the UTF-8 character set.
Renvoie
string The query that creates database
Depuis
2.0.0

Références $options.

◆ getDatabase()

getDatabase ( )
protected

Gets the name of the database used by this connection.

Renvoie
string
Depuis
1.0

◆ getDateFormat()

getDateFormat ( )

Returns a PHP date() function compliant date format for the database driver.

Renvoie
string
Depuis
1.0

Implémente DatabaseInterface.

◆ getExporter()

getExporter ( )

Gets an exporter class object.

Renvoie
DatabaseExporter An exporter object.
Depuis
1.0
Exceptions

Références $this, et name.

◆ getImporter()

getImporter ( )

Gets an importer class object.

Renvoie
DatabaseImporter
Depuis
1.0

Références $this, et name.

◆ getInstance()

static getInstance ( array  $options = [])
static

Method to return a DatabaseDriver instance based on the given options.

There are three global options and then the rest are specific to the database driver.

  • The 'driver' option defines which DatabaseDriver class is used for the connection – the default is 'mysqli'.
  • The 'database' option determines which database is to be used for the connection.
  • The 'select' option determines whether the connector should automatically select the chosen database.

Instances are unique to the given options and new objects are only created when a unique options array is passed into the method. This ensures that we don't end up with unnecessary database connection resources.

Paramètres
array$optionsParameters to be passed to the database driver.
Renvoie
DatabaseDriver
Depuis
1.0
Exceptions

Références DatabaseDriver\$options, class, et null.

Référencé par SetConfigurationCommand\checkDb(), DatabaseLogger\connect(), DatabaseModel\createDatabase(), Factory\createDbo(), DatabaseHelper\getDbo(), Database\register(), et ApplicationModel\save().

◆ getIterator()

getIterator (   $column = null,
  $class = \stdClass::class 
)

Get a new iterator on the current query.

Paramètres
string$columnAn option column to use as the iterator key.
string$classThe class of object that is returned.
Renvoie
DatabaseIterator
Depuis
1.0

Calling setQuery free's the statement from the iterator which will break the iterator. So we set statement to null so that freeResult on the statement here has no affect. If you unset the iterator object then that will close the cursor and free the result.

Références $class, name, et null.

◆ getMinimum()

getMinimum ( )

Get the minimum supported database version.

Renvoie
string
Depuis
1.0

Implémente DatabaseInterface.

◆ getMonitor()

getMonitor ( )

Get the query monitor.

Renvoie
QueryMonitorInterface|null The query monitor or null if not set.
Depuis
2.0.0

◆ getName()

getName ( )

Get the name of the database driver.

If $this->name is not set it will try guessing the driver name from the class name.

Renvoie
string
Depuis
1.4.0

Implémente DatabaseInterface.

Références $name, $this, et name.

◆ getNullDate()

getNullDate ( )

Get the null or zero representation of a timestamp for the database driver.

Renvoie
string
Depuis
1.0

Implémente DatabaseInterface.

Référencé par PgsqlDriver\sqlValue().

◆ getNumRows()

getNumRows ( )

Get the number of returned rows for the previous executed SQL statement.

Renvoie
integer The number of returned rows.
Depuis
2.0.0

Implémente DatabaseInterface.

◆ getPrefix()

getPrefix ( )

Get the common table prefix for the database driver.

Renvoie
string The common database table prefix.
Depuis
1.0

◆ getQuery()

◆ getServerType()

getServerType ( )

Get the server family type.

If $this->serverType is not set it will attempt guessing the server family type from the driver name. If this is not possible the driver name will be returned instead.

Renvoie
string
Depuis
1.4.0

Implémente DatabaseInterface.

Références $name, et elseif.

◆ getTableCreate()

getTableCreate (   $tables)
abstract

Shows the table CREATE statement that creates the given tables.

Paramètres
mixed$tablesA table name or a list of table names.
Renvoie
array A list of the create SQL for the tables.
Depuis
1.0
Exceptions

◆ hasUtfSupport()

hasUtfSupport ( )

Determine whether or not the database engine supports UTF-8 character encoding.

Renvoie
boolean True if the database engine supports UTF-8 character encoding.
Depuis
1.0

Implémente DatabaseInterface.

◆ insertObject()

insertObject (   $table,
$object,
  $key = null 
)

Inserts a row into a table based on an object's properties.

Paramètres
string$tableThe name of the database table to insert into.
object$objectA reference to an object whose public properties match the table fields.
string$keyThe name of the primary key. If provided the object property is updated.
Renvoie
boolean
Depuis
1.0
Exceptions

Implémente DatabaseInterface.

Références $fields, $id, $key, $query, et null.

◆ isMinimumVersion()

isMinimumVersion ( )

Method to check whether the installed database version is supported by the database driver

Renvoie
boolean True if the database version is supported
Depuis
1.0

Implémente DatabaseInterface.

◆ loadAssoc()

loadAssoc ( )

Method to get the first row of the result set from the database query as an associative array of ['field_name' => 'row_value'].

Renvoie
mixed The return value or null if the query failed.
Depuis
1.0
Exceptions

Implémente DatabaseInterface.

Références null.

Référencé par PgsqlDriver\getRandom().

◆ loadAssocList()

loadAssocList (   $key = null,
  $column = null 
)

Method to get an array of the result set rows from the database query where each row is an associative array of ['field_name' => 'row_value']. The array of rows can optionally be keyed by a field name, but defaults to a sequential numeric array.

NOTE: Choosing to key the result array by a non-unique field name can result in unwanted behavior and should be avoided.

Paramètres
string$keyThe name of a field on which to key the result array.
string$columnAn optional column name. Instead of the whole row, only this column value will be in the result array.
Renvoie
mixed The return value or null if the query failed.
Depuis
1.0
Exceptions

Implémente DatabaseInterface.

Références $key, et $value.

Référencé par PgsqlDriver\getCollation(), et PgsqlDriver\getConnectionCollation().

◆ loadColumn()

loadColumn (   $offset = 0)

Method to get an array of values from the $offset field in each row of the result set from the database query.

Paramètres
integer$offsetThe row offset to use to build the result array.
Renvoie
mixed The return value or null if the query failed.
Depuis
1.0
Exceptions

Implémente DatabaseInterface.

Références Joomla\Database\Query\$offset.

Référencé par PgsqlDriver\getTableList(), PgsqlDriver\renameTable(), et PgsqlDriver\showTables().

◆ loadObject()

loadObject (   $class = \stdClass::class)

Method to get the first row of the result set from the database query as an object.

Paramètres
string$classThe class name to use for the returned row object.
Renvoie
mixed The return value or null if the query failed.
Depuis
1.0
Exceptions

Implémente DatabaseInterface.

Références $class, class, et null.

◆ loadObjectList()

loadObjectList (   $key = '',
  $class = \stdClass::class 
)

Method to get an array of the result set rows from the database query where each row is an object. The array of objects can optionally be keyed by a field name, but defaults to a sequential numeric array.

NOTE: Choosing to key the result array by a non-unique field name can result in unwanted behavior and should be avoided.

Paramètres
string$keyThe name of a field on which to key the result array.
string$classThe class name to use for the returned row objects.
Renvoie
mixed The return value or null if the query failed.
Depuis
1.0
Exceptions

Implémente DatabaseInterface.

Références $class, $key, et class.

Référencé par PgsqlDriver\getTableColumns(), PgsqlDriver\getTableKeys(), et PgsqlDriver\getTableSequences().

◆ loadResult()

loadResult ( )

Method to get the first field of the first row of the result set from the database query.

Renvoie
mixed The return value or null if the query failed.
Depuis
1.0
Exceptions

Implémente DatabaseInterface.

Références null.

Référencé par PdoDriver\connected(), PgsqlDriver\getDefaultSchema(), PgsqlDriver\getNamesKey(), PgsqlDriver\getSequenceIsCalled(), et PgsqlDriver\getSequenceLastValue().

◆ loadRow()

loadRow ( )

Method to get the first row of the result set from the database query as an array.

Columns are indexed numerically so the first column in the result set would be accessible via $row[0], etc.

Renvoie
mixed The return value or null if the query failed.
Depuis
1.0
Exceptions

Implémente DatabaseInterface.

Références null.

Référencé par PgsqlDriver\getStringPositionSql().

◆ loadRowList()

loadRowList (   $key = null)

Method to get an array of the result set rows from the database query where each row is an array. The array of objects can optionally be keyed by a field offset, but defaults to a sequential numeric array.

NOTE: Choosing to key the result array by a non-unique field can result in unwanted behavior and should be avoided.

Paramètres
string$keyThe name of a field on which to key the result array.
Renvoie
array An array of results.
Depuis
1.0
Exceptions

Implémente DatabaseInterface.

Références $key, et null.

◆ prepareStatement()

prepareStatement ( string  $query)
abstractprotected

Prepares a SQL statement for execution

Paramètres
string$queryThe SQL query to be prepared.
Renvoie
StatementInterface
Depuis
2.0.0
Exceptions
PrepareStatementFailureException

◆ q()

q (   $text,
  $escape = true 
)

Alias for quote method

Paramètres
array | string$textA string or an array of strings to quote.
boolean$escapeTrue (default) to escape the string, false to leave it unchanged.
Renvoie
string The quoted input string.
Depuis
1.0

Références $text.

◆ qn()

qn (   $name,
  $as = null 
)

Alias for quoteName method

Paramètres
array | string$nameThe identifier name to wrap in quotes, or an array of identifier names to wrap in quotes. Each type supports dot-notation name.
array | string$asThe AS query part associated to $name. It can be string or array, in latter case it has to be same length of $name; if is null there will not be any AS part for string or array element.
Renvoie
array|string The quote wrapped name, same type of $name.
Depuis
1.0

Références $name.

◆ quote()

quote (   $text,
  $escape = true 
)

Quotes and optionally escapes a string to database requirements for use in database queries.

Paramètres
array | string$textA string or an array of strings to quote.
boolean$escapeTrue (default) to escape the string, false to leave it unchanged.
Renvoie
string The quoted input string.
Depuis
1.0

Implémente DatabaseInterface.

Références $text.

Référencé par PgsqlDriver\getAlterDbCharacterSet(), PgsqlDriver\getCreateDbQuery(), PgsqlDriver\getNamesKey(), PgsqlDriver\getTableColumns(), PgsqlDriver\getTableKeys(), PgsqlDriver\getTableList(), PgsqlDriver\getTableSequences(), MysqlDriver\insertObject(), MysqliDriver\insertObject(), PgsqlDriver\renameTable(), PgsqlDriver\showTables(), et PgsqlDriver\sqlValue().

◆ quoteBinary()

quoteBinary (   $data)

Quotes a binary string to database requirements for use in database queries.

Paramètres
string$dataA binary string to quote.
Renvoie
string The binary quoted input string.
Depuis
1.7.0

Implémente DatabaseInterface.

Références $data.

◆ quoteName()

quoteName (   $name,
  $as = null 
)

Wrap an SQL statement identifier name such as column, table or database names in quotes to prevent injection risks and reserved word conflicts.

Paramètres
array | string$nameThe identifier name to wrap in quotes, or an array of identifier names to wrap in quotes. Each type supports dot-notation name.
array | string$asThe AS query part associated to $name. It can be string or array, in latter case it has to be same length of $name; if is null there will not be any AS part for string or array element.
Renvoie
array|string The quote wrapped name, same type of $name.
Depuis
1.0

Implémente DatabaseInterface.

Références $count, $i, $name, elseif, et null.

Référencé par MysqliDriver\getAlterDbCharacterSet(), PgsqlDriver\getAlterDbCharacterSet(), PgsqlDriver\getConnectionEncryption(), MysqlDriver\getCreateDatabaseQuery(), MysqliDriver\getCreateDatabaseQuery(), PgsqlDriver\getCreateDbQuery(), PgsqlDriver\getSequenceIsCalled(), PgsqlDriver\getSequenceLastValue(), MysqlDriver\getTableColumns(), MysqliDriver\getTableColumns(), MysqlDriver\getTableCreate(), MysqliDriver\getTableCreate(), MysqlDriver\getTableKeys(), MysqliDriver\getTableKeys(), PgsqlDriver\getTableSequences(), MysqlDriver\insertObject(), MysqliDriver\insertObject(), PgsqlDriver\insertObject(), PgsqlDriver\lockTable(), MysqlDriver\lockTable(), MysqliDriver\lockTable(), MysqlDriver\renameTable(), SqliteDriver\transactionRollback(), PgsqlDriver\transactionRollback(), MysqlDriver\transactionRollback(), MysqliDriver\transactionRollback(), SqliteDriver\transactionStart(), PgsqlDriver\transactionStart(), MysqlDriver\transactionStart(), SqliteDriver\truncateTable(), et PgsqlDriver\updateObject().

◆ quoteNameStr()

quoteNameStr (   $strArr)
protected

Quote strings coming from quoteName call.

Paramètres
array$strArrArray of strings coming from quoteName dot-explosion.
Renvoie
string Dot-imploded string of quoted parts.
Depuis
1.0
Obsolète:
2.0 Use quoteNameString instead

Références $parts, et null.

◆ quoteNameString()

quoteNameString (   $name,
  $asSinglePart = false 
)
protected

Quote string coming from quoteName call.

Paramètres
string$nameIdentifier name to be quoted.
boolean$asSinglePartTreat the name as a single part of the identifier.
Renvoie
string Quoted identifier string.
Depuis
1.7.0

Références $name.

◆ replacePrefix()

replacePrefix (   $sql,
  $prefix = '#__' 
)

This function replaces a string identifier with the configured table prefix.

Paramètres
string$sqlThe SQL statement to prepare.
string$prefixThe table prefix.
Renvoie
string The processed SQL statement.
Depuis
1.0

Implémente DatabaseInterface.

Références $n, $prefix, et $sql.

Référencé par PdoDriver\execute(), et MysqliDriver\lockTable().

◆ setMonitor()

setMonitor ( QueryMonitorInterface  $monitor = null)

Set a query monitor.

Paramètres
QueryMonitorInterface | null$monitorThe query monitor.
Renvoie
$this
Depuis
2.0.0

Références $this.

◆ setQuery()

setQuery (   $query,
  $offset = 0,
  $limit = 0 
)

Sets the SQL statement string for later execution.

Paramètres
string | QueryInterface$queryThe SQL statement to set either as a Query object or a string.
integer$offsetThe affected row offset to set. {
Obsolète:
3.0 Use LimitableInterface::setLimit() instead}
Paramètres
integer$limitThe maximum affected rows to set. {
Obsolète:
3.0 Use LimitableInterface::setLimit() instead}
Renvoie
$this
Depuis
1.0
Exceptions

Implémente DatabaseInterface.

Références $limit, Joomla\Database\Query\$offset, $query, $sql, $this, class, elseif, Joomla\Database\Query\limit(), et Joomla\Database\Query\offset().

Référencé par PgsqlDriver\connect(), PdoDriver\connected(), PgsqlDriver\getCollation(), MysqliDriver\getCollation(), PgsqlDriver\getConnectionCollation(), MysqliDriver\getConnectionCollation(), PgsqlDriver\getConnectionEncryption(), MysqliDriver\getConnectionEncryption(), PgsqlDriver\getDefaultSchema(), PgsqlDriver\getNamesKey(), PgsqlDriver\getRandom(), PgsqlDriver\getSequenceIsCalled(), PgsqlDriver\getSequenceLastValue(), PgsqlDriver\getStringPositionSql(), PgsqlDriver\getTableColumns(), SqliteDriver\getTableColumns(), MysqlDriver\getTableColumns(), MysqliDriver\getTableColumns(), MysqlDriver\getTableCreate(), MysqliDriver\getTableCreate(), SqliteDriver\getTableKeys(), PgsqlDriver\getTableKeys(), MysqlDriver\getTableKeys(), MysqliDriver\getTableKeys(), SqliteDriver\getTableList(), PgsqlDriver\getTableList(), MysqlDriver\getTableList(), MysqliDriver\getTableList(), PgsqlDriver\getTableSequences(), SqliteDriver\getVersion(), MysqlDriver\insertObject(), MysqliDriver\insertObject(), PgsqlDriver\insertObject(), PgsqlDriver\isConnectionEncryptionSupported(), MysqlDriver\isConnectionEncryptionSupported(), MysqliDriver\isConnectionEncryptionSupported(), PgsqlDriver\lockTable(), MysqlDriver\lockTable(), SqliteDriver\renameTable(), PgsqlDriver\renameTable(), MysqlDriver\renameTable(), MysqliDriver\renameTable(), PgsqlDriver\showTables(), SqliteDriver\transactionRollback(), PgsqlDriver\transactionRollback(), MysqlDriver\transactionRollback(), SqliteDriver\transactionStart(), PgsqlDriver\transactionStart(), MysqlDriver\transactionStart(), SqliteDriver\truncateTable(), MysqlDriver\unlockTables(), et PgsqlDriver\updateObject().

◆ setUtf()

setUtf ( )
abstract

Set the connection to use UTF-8 character encoding.

Renvoie
boolean True on success.
Depuis
1.0

◆ splitSql()

static splitSql (   $sql)
static

Splits a string of multiple queries into an array of individual queries.

Paramètres
string$sqlInput SQL string with which to split into individual queries.
Renvoie
array
Depuis
1.0

Références $i, $query, DatabaseDriver\$sql, $start, et elseif.

Référencé par DatabaseHandler\createDatabaseTable(), et ChangeSet\getUpdateQueries().

◆ truncateTable()

truncateTable (   $table)

Method to truncate a table.

Paramètres
string$tableThe table to truncate
Renvoie
void
Depuis
1.0
Exceptions

Implémente DatabaseInterface.

◆ updateObject()

updateObject (   $table,
$object,
  $key,
  $nulls = false 
)

Updates a row in a table based on an object's properties.

Paramètres
string$tableThe name of the database table to update.
object$objectA reference to an object whose public properties match the table fields.
array | string$keyThe name of the primary key.
boolean$nullsTrue to update null fields or false to ignore them.
Renvoie
boolean True on success.
Depuis
1.0
Exceptions

Implémente DatabaseInterface.

Références $fields, $key, $val, et null.

Documentation des champs

◆ $connection

$connection
protected

◆ $connectors

$connectors = []
staticprotected

◆ $count

$count = 0
protected

◆ $cursor

$cursor
protected

◆ $database

$database
private

Référencé par MysqliDriver\select().

◆ $dbMinimum

$dbMinimum
staticprotected

◆ $errorMsg

$errorMsg
protected

◆ $errorNum

$errorNum = 0
protected

◆ $executed

$executed = false
protected

◆ $factory

$factory
protected

◆ $instances

$instances = []
staticprotected

◆ $limit

$limit = 0
protected

Référencé par PdoDriver\connected().

◆ $monitor

$monitor
protected

◆ $name

$name
protected

◆ $nameQuote

$nameQuote
protected

◆ $nullDate

$nullDate
protected

◆ $offset

$offset = 0
protected

Référencé par PdoDriver\connected().

◆ $options

◆ $serverType

$serverType

◆ $sql

◆ $statement

$statement
protected

◆ $tablePrefix

$tablePrefix
protected

◆ $transactionDepth

◆ $utf


La documentation de cette classe a été générée à partir du fichier suivant :