JDatabaseDriverSqlite
Extends \JDatabaseDriverPdoSQLite database driver
link | |
---|---|
since |
3.0.0 |
package |
Joomla.Platform |
Methods
__call
Magic method to provide method alias support for quote() and quoteName().
__call(string $method, array $args) : mixed
since |
1.7.0 |
---|
Arguments
- $method
string
The called method.- $args
array
The array of arguments passed to the method.
Response
mixed
The aliased method's return value or null.
__construct
Constructor.
__construct(array $options)
since |
1.7.0 |
---|
Arguments
- $options
array
List of options used to configure the connection
__destruct
Destructor.
__destruct()
since |
3.8.0 |
---|
__sleep
PDO does not support serialize
__sleep() : array
since |
3.1.4 |
---|
Response
array
__wakeup
Wake up after serialization
__wakeup() : array
since |
3.1.4 |
---|
Response
array
addDisconnectHandler
Adds a function callable just before disconnecting the database. Parameter of the callable is $this JDatabaseDriver
addDisconnectHandler(callable $callable) : void
since |
---|
Arguments
- $callable
callable
Function to call in disconnect() method just before disconnecting from database
alterDbCharacterSet
Alter database's character set, obtaining query string from protected member.
alterDbCharacterSet(string $dbName) : string
since |
3.0.1 |
---|---|
throws |
|
Arguments
- $dbName
string
The database name that will be altered
Response
string
The query that alter the database query string
alterTableCharacterSet
Alter a table's character set, obtaining an array of queries to do so from a protected method. The conversion is wrapped in a transaction, if supported by the database driver. Otherwise the table will be locked before the conversion. This prevents data corruption.
alterTableCharacterSet(string $tableName, boolean $rethrow = false) : boolean
since | |
---|---|
throws |
|
Arguments
- $tableName
string
The name of the table to alter- $rethrow
boolean
True to rethrow database exceptions. Default: false (exceptions are suppressed)
Response
boolean
True if successful
connect
Connects to the database if needed.
connect() : void
since |
3.0.0 |
---|---|
throws |
|
connected
Determines if the connection to the server is active.
connected() : boolean
since |
1.7.0 |
---|
Response
boolean
True if connected to the database engine.
convertUtf8mb4QueryToUtf8
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.
convertUtf8mb4QueryToUtf8(string $query) : string
Arguments
- $query
string
The query to convert
Response
string
The converted query
createDatabase
Create a new database using information from $options object, obtaining query string from protected member.
createDatabase(\stdClass $options, boolean $utf = true) : string
since |
3.0.1 |
---|---|
throws |
|
Arguments
- $options
\stdClass
Object used to pass user and database name to database driver. This object must have "db_name" and "db_user" set.- $utf
boolean
True if the database supports the UTF-8 character set.
Response
string
The query that creates database
disconnect
Disconnects the database.
disconnect() : void
since |
3.0.0 |
---|
dropTable
Drops a table from the database.
dropTable(string $table, boolean $ifExists = true) : \JDatabaseDriver
since |
2.5.0 |
---|---|
throws |
|
Arguments
- $table
string
The name of the database table to drop.- $ifExists
boolean
Optionally specify that the table must exist before it is dropped.
Response
\JDatabaseDriver
Returns this object to support chaining.
escape
Escapes a string for usage in an SQL statement.
escape(string $text, boolean $extra = false) : string
since |
1.7.0 |
---|
Arguments
- $text
string
The string to be escaped.- $extra
boolean
Optional parameter to provide extra escaping.
Response
string
The escaped string.
execute
Execute the SQL statement.
execute() : mixed
since |
3.0.0 |
---|---|
throws |
|
Response
mixed
A database cursor resource on success, boolean false on failure.
fetchArray
Method to fetch a row from the result set cursor as an array.
fetchArray(mixed $cursor = null) : mixed
since |
1.7.0 |
---|
Arguments
- $cursor
mixed
The optional result set cursor from which to fetch the row.
Response
mixed
Either the next row from the result set or false if there are no more rows.
fetchAssoc
Method to fetch a row from the result set cursor as an associative array.
fetchAssoc(mixed $cursor = null) : mixed
since |
1.7.0 |
---|
Arguments
- $cursor
mixed
The optional result set cursor from which to fetch the row.
Response
mixed
Either the next row from the result set or false if there are no more rows.
fetchObject
Method to fetch a row from the result set cursor as an object.
fetchObject(mixed $cursor = null, string $class = 'stdClass') : mixed
since |
1.7.0 |
---|
Arguments
- $cursor
mixed
The optional result set cursor from which to fetch the row.- $class
string
The class name to use for the returned row object.
Response
mixed
Either the next row from the result set or false if there are no more rows.
freeResult
Method to free up the memory used for the result set.
freeResult(mixed $cursor = null) : void
since |
1.7.0 |
---|
Arguments
- $cursor
mixed
The optional result set cursor from which to fetch the row.
getAffectedRows
Get the number of affected rows for the previous executed SQL statement.
getAffectedRows() : integer
since |
1.7.0 |
---|
Response
integer
The number of affected rows.
getAlterDbCharacterSet
Return the query string to alter the database character set.
getAlterDbCharacterSet(string $dbName) : string
since |
3.0.1 |
---|
Arguments
- $dbName
string
The database name
Response
string
The query that alter the database query string
getAlterTableCharacterSet
Get the query strings to alter the character set and collation of a table.
getAlterTableCharacterSet(string $tableName) : array<mixed,string>
since |
---|
Arguments
- $tableName
string
The name of the table
Response
array<mixed,string>
The queries required to alter the table's character set and collation
getCallStacks
Get the database driver SQL statement log.
getCallStacks() : array
since |
---|
Response
array
SQL statements executed by the database driver.
getCollation
Method to get the database collation in use by sampling a text field of a table in the database.
getCollation() : mixed
since |
1.7.0 |
---|
Response
mixed
The collation in use by the database or boolean false if not supported.
getConnectedQuery
Get a query to run and verify the database is operational.
getConnectedQuery() : string
since |
3.0.1 |
---|
Response
string
The query to check the health of the DB.
getConnection
Method that provides access to the underlying database connection. Useful for when you need to call a proprietary method such as postgresql's lo_* methods.
getConnection() : resource
since |
1.7.0 |
---|
Response
resource
The underlying database connection resource.
getConnectionCollation
Method to get the database connection collation, as reported by the driver. If the connector doesn't support reporting this value please return an empty string.
getConnectionCollation() : string
Response
string
getConnectors
Get a list of available database connectors. The list will only be populated with connectors that both the class exists and the static test method returns true. This gives us the ability to have a multitude of connector classes that are self-aware as to whether or not they are able to be used on a given system.
getConnectors() : array
since |
1.7.0 |
---|---|
deprecated |
4.0 |
Response
array
An array of available database connectors.
getCount
Get the total number of SQL statements executed by the database driver.
getCount() : integer
since |
1.7.0 |
---|
Response
integer
getCreateDatabaseQuery
Return the query string to create new Database.
getCreateDatabaseQuery(\stdClass $options, boolean $utf) : string
Each database driver, other than MySQL, need to override this member to return correct string.
since |
3.0.1 |
---|
Arguments
- $options
\stdClass
Object used to pass user and database name to database driver. This object must have "db_name" and "db_user" set.- $utf
boolean
True if the database supports the UTF-8 character set.
Response
string
The query that creates database
getDatabase
Gets the name of the database used by this connection.
getDatabase() : string
since |
2.5.0 |
---|
Response
string
getDateFormat
Returns a PHP date() function compliant date format for the database driver.
getDateFormat() : string
since |
1.7.0 |
---|
Response
string
The format string.
getErrorMessage
Return the actual SQL Error message
getErrorMessage() : string
since |
3.4.6 |
---|
Response
string
The SQL Error message
getErrorMsg
Gets the error message from the database connection.
getErrorMsg(boolean $escaped = false) : string
deprecated |
4.0 |
---|---|
since |
1.7.0 |
Arguments
- $escaped
boolean
True to escape the message string for use in JavaScript.
Response
string
The error message for the most recent query.
getErrorNum
Gets the error number from the database connection.
getErrorNum() : integer
since |
1.7.0 |
---|---|
deprecated |
4.0 |
Response
integer
The error number for the most recent query.
getErrorNumber
Return the actual SQL Error number
getErrorNumber() : integer
since |
3.4.6 |
---|
Response
integer
The SQL Error number
getExporter
Gets an exporter class object.
getExporter() : \JDatabaseExporter
getImporter
Gets an importer class object.
getImporter() : \JDatabaseImporter
getInstance
Method to return a JDatabaseDriver 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 JDatabaseDriver 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.
getInstance(array $options = array()) : \JDatabaseDriver
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.
since |
1.7.0 |
---|---|
deprecated |
4.0 |
Arguments
- $options
array
Parameters to be passed to the database driver.
Response
\JDatabaseDriver
A database object.
getIterator
Get a new iterator on the current query.
getIterator(string $column = null, string $class = 'stdClass') : \JDatabaseIterator
since |
3.0.0 |
---|---|
throws |
|
Arguments
- $column
string
An option column to use as the iterator key.- $class
string
The class of object that is returned.
Response
\JDatabaseIterator
A new database iterator.
getLog
Get the database driver SQL statement log.
getLog() : array
since |
1.7.0 |
---|
Response
array
SQL statements executed by the database driver.
getMinimum
Get the minimum supported database version.
getMinimum() : string
since |
3.0.0 |
---|
Response
string
The minimum version number for the database driver.
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.
getName() : string
since |
---|
Response
string
getNullDate
Get the null or zero representation of a timestamp for the database driver.
getNullDate() : string
since |
1.7.0 |
---|
Response
string
Null or zero representation of a timestamp.
getNumRows
Get the number of returned rows for the previous executed SQL statement.
getNumRows(resource $cursor = null) : integer
since |
1.7.0 |
---|
Arguments
- $cursor
resource
An optional database cursor resource to extract the row count from.
Response
integer
The number of returned rows.
getOption
Retrieve a PDO database connection attribute
getOption(mixed $key) : mixed
Usage: $db->getOption(PDO::ATTR_CASE);
link | |
---|---|
since |
3.0.0 |
Arguments
- $key
mixed
One of the PDO::ATTR_* Constants
Response
mixed
getPrefix
Get the common table prefix for the database driver.
getPrefix() : string
since |
1.7.0 |
---|
Response
string
The common database table prefix.
getQuery
Get the current query object or a new JDatabaseQuery object.
getQuery(boolean $new = false) : \JDatabaseQuery
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $new
boolean
False to return the current query object, True to return a new JDatabaseQuery object.
Response
\JDatabaseQuery
The current query object or a new object extending the JDatabaseQuery class.
getServerType
Get the server family type, e.g. mysql, postgresql, oracle, sqlite, mssql. 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.
getServerType() : string
since |
---|
Response
string
getTableColumns
Retrieves field information about the given tables.
getTableColumns(string $table, boolean $typeOnly = true) : array
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $table
string
The name of the database table.- $typeOnly
boolean
True (default) to only return field types.
Response
array
An array of fields by table.
getTableCreate
Shows the table CREATE statement that creates the given tables.
getTableCreate(mixed $tables) : array
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $tables
mixed
A table name or a list of table names.
Response
array
A list of the create SQL for the tables.
getTableKeys
Retrieves keys information about the given table.
getTableKeys(string $table) : array
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $table
string
The name of the table.
Response
array
An array of keys for the table.
getTableList
Method to get an array of all tables in the database.
getTableList() : array
since |
1.7.0 |
---|---|
throws |
|
Response
array
An array of all the tables in the database.
getTimings
Get the database driver SQL statement log.
getTimings() : array
since |
---|
Response
array
SQL statements executed by the database driver.
getUTFSupport
Determine whether or not the database engine supports UTF-8 character encoding.
getUTFSupport() : boolean
since |
1.7.0 |
---|---|
deprecated |
4.0 - Use hasUTFSupport() instead |
Response
boolean
True if the database engine supports UTF-8 character encoding.
getVersion
Get the version of the database connector
getVersion() : string
since |
1.7.0 |
---|
Response
string
The database connector version.
hasUTF8mb4Support
Determine whether the database engine support the UTF-8 Multibyte (utf8mb4) character encoding. This applies to MySQL databases.
hasUTF8mb4Support() : boolean
since |
---|
Response
boolean
True if the database engine supports UTF-8 Multibyte.
hasUTFSupport
Determine whether or not the database engine supports UTF-8 character encoding.
hasUTFSupport() : boolean
since |
3.0.0 |
---|
Response
boolean
True if the database engine supports UTF-8 character encoding.
insertid
Method to get the auto-incremented value from the last INSERT statement.
insertid() : mixed
since |
1.7.0 |
---|
Response
mixed
The value of the auto-increment field from the last inserted row.
insertObject
Inserts a row into a table based on an object's properties.
insertObject(string $table, &$object, string $key = null) : boolean
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $table
string
The name of the database table to insert into.- $object
- $key
string
The name of the primary key. If provided the object property is updated.
Response
boolean
True on success.
isMinimumVersion
Method to check whether the installed database version is supported by the database driver
isMinimumVersion() : boolean
since |
3.0.0 |
---|
Response
boolean
True if the database version is supported
isSupported
Test to see if the PDO extension is available.
isSupported() : boolean
Override as needed to check for specific PDO Drivers.
since |
3.0.0 |
---|
Response
boolean
True on success, false otherwise.
loadAssoc
Method to get the first row of the result set from the database query as an associative array of ['field_name' => 'row_value'].
loadAssoc() : mixed
since |
1.7.0 |
---|---|
throws |
|
Response
mixed
The return value or null if the query failed.
loadAssocList
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.
loadAssocList(string $key = null, string $column = null) : mixed
NOTE: Choosing to key the result array by a non-unique field name can result in unwanted behavior and should be avoided.
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $key
string
The name of a field on which to key the result array.- $column
string
An optional column name. Instead of the whole row, only this column value will be in the result array.
Response
mixed
The return value or null if the query failed.
loadColumn
Method to get an array of values from the $offset field in each row of the result set from the database query.
loadColumn(integer $offset) : mixed
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $offset
integer
The row offset to use to build the result array.
Response
mixed
The return value or null if the query failed.
loadNextAssoc
Method to get the next row in the result set from the database query as an array.
loadNextAssoc() : mixed
since |
3.0.0 |
---|---|
throws |
|
Response
mixed
The result of the query as an array, false if there are no more rows.
loadNextObject
Method to get the next row in the result set from the database query as an object.
loadNextObject(string $class = 'stdClass') : mixed
since |
1.7.0 |
---|---|
throws |
|
deprecated |
4.0 - Use getIterator() instead |
Arguments
- $class
string
The class name to use for the returned row object.
Response
mixed
The result of the query as an array, false if there are no more rows.
loadNextRow
Method to get the next row in the result set from the database query as an array.
loadNextRow() : mixed
since |
1.7.0 |
---|---|
throws |
|
deprecated |
4.0 (CMS) Use JDatabaseDriver::getIterator() instead |
Response
mixed
The result of the query as an array, false if there are no more rows.
loadObject
Method to get the first row of the result set from the database query as an object.
loadObject(string $class = 'stdClass') : mixed
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $class
string
The class name to use for the returned row object.
Response
mixed
The return value or null if the query failed.
loadObjectList
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.
loadObjectList(string $key = '', string $class = 'stdClass') : mixed
NOTE: Choosing to key the result array by a non-unique field name can result in unwanted behavior and should be avoided.
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $key
string
The name of a field on which to key the result array.- $class
string
The class name to use for the returned row objects.
Response
mixed
The return value or null if the query failed.
loadResult
Method to get the first field of the first row of the result set from the database query.
loadResult() : mixed
since |
1.7.0 |
---|---|
throws |
|
Response
mixed
The return value or null if the query failed.
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.
loadRow() : mixed
since |
1.7.0 |
---|---|
throws |
|
Response
mixed
The return value or null if the query failed.
loadRowList
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.
loadRowList(integer $index = null) : mixed
NOTE: Choosing to key the result array by a non-unique field can result in unwanted behavior and should be avoided.
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $index
integer
The index of a field on which to key the result array.
Response
mixed
The return value or null if the query failed.
lockTable
Locks a table in the database.
lockTable(string $tableName) : \JDatabaseDriver
since |
2.5.0 |
---|---|
throws |
|
Arguments
- $tableName
string
The name of the table to unlock.
Response
\JDatabaseDriver
Returns this object to support chaining.
q
q(mixed $text, \= $escape) : string|array
Alias for quote method
Arguments
- $text
mixed
- $escape
\=
Response
string|array
qn
qn(mixed $name, \= $as) : string|array
Alias for quoteName method
Arguments
- $name
mixed
- $as
\=
Response
string|array
query
Execute the SQL statement.
query() : mixed
since |
1.7.0 |
---|---|
throws |
|
deprecated |
4.0 |
Response
mixed
A database cursor resource on success, boolean false on failure.
quote
Quotes and optionally escapes a string to database requirements for use in database queries.
quote(mixed $text, boolean $escape = true) : string|array
note |
Accepting an array of strings was added in 12.3. |
---|---|
since |
1.7.0 |
Arguments
- $text
mixed
A string or an array of strings to quote.- $escape
boolean
True (default) to escape the string, false to leave it unchanged.
Response
string|array
The quoted input.
quoteBinary
Quotes a binary string to database requirements for use in database queries.
quoteBinary(mixed $data) : string
since |
3.9.12 |
---|
Arguments
- $data
mixed
A binary string to quote.
Response
string
The binary quoted input string.
quoteName
Wrap an SQL statement identifier name such as column, table or database names in quotes to prevent injection risks and reserved word conflicts.
quoteName(mixed $name, mixed $as = null) : mixed
since |
1.7.0 |
---|
Arguments
- $name
mixed
The identifier name to wrap in quotes, or an array of identifier names to wrap in quotes. Each type supports dot-notation name.- $as
mixed
The 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.
Response
mixed
The quote wrapped name, same type of $name.
quoteNameStr
Quote strings coming from quoteName call.
quoteNameStr(array $strArr) : string
since |
1.7.3 |
---|
Arguments
- $strArr
array
Array of strings coming from quoteName dot-explosion.
Response
string
Dot-imploded string of quoted parts.
renameTable
Renames a table in the database.
renameTable(string $oldTable, string $newTable, string $backup = null, string $prefix = null) : \JDatabaseDriver
since |
2.5.0 |
---|---|
throws |
|
Arguments
- $oldTable
string
The name of the table to be renamed- $newTable
string
The new name for the table.- $backup
string
Table prefix- $prefix
string
For the table - used to rename constraints in non-mysql databases
Response
\JDatabaseDriver
Returns this object to support chaining.
replacePrefix
This function replaces a string identifier $prefix with the string held is the tablePrefix class variable.
replacePrefix(string $sql, string $prefix = '#__') : string
since |
1.7.0 |
---|
Arguments
- $sql
string
The SQL statement to prepare.- $prefix
string
The common table prefix.
Response
string
The processed SQL statement.
select
Select a database for use.
select(string $database) : boolean
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $database
string
The name of the database to select for use.
Response
boolean
True if the database was successfully selected.
setDebug
Sets the database debugging state for the driver.
setDebug(boolean $level) : boolean
since |
1.7.0 |
---|---|
deprecated |
4.0 This will be removed in Joomla 4 without replacement |
Arguments
- $level
boolean
True to enable debugging.
Response
boolean
The old debugging level.
setOption
Sets an attribute on the PDO database handle.
setOption(integer $key, mixed $value) : boolean
Usage: $db->setOption(PDO::ATTR_CASE, PDO::CASE_UPPER);
link | |
---|---|
since |
3.0.0 |
Arguments
- $key
integer
One of the PDO::ATTR_* Constants- $value
mixed
One of the associated PDO Constants related to the particular attribute key.
Response
boolean
setQuery
Sets the SQL statement string for later execution.
setQuery(mixed $query, integer $offset, integer $limit) : \JDatabaseDriver
since |
1.7.0 |
---|
Arguments
- $query
mixed
The SQL statement to set either as a JDatabaseQuery object or a string.- $offset
integer
The affected row offset to set.- $limit
integer
The maximum affected rows to set.
Response
\JDatabaseDriver
This object to support method chaining.
setUtf
Set the connection to use UTF-8 character encoding.
setUtf() : boolean
since |
1.7.0 |
---|
Response
boolean
True on success.
splitSql
Splits a string of multiple queries into an array of individual queries.
splitSql(string $query) : array
since |
1.7.0 |
---|---|
deprecated |
4.0 |
Arguments
- $query
string
Input SQL string with which to split into individual queries.
Response
array
The queries from the input string separated into an array.
stderr
Return the most recent error message for the database connector.
stderr(boolean $showSQL = false) : string
since |
1.7.0 |
---|---|
deprecated |
4.0 |
Arguments
- $showSQL
boolean
True to display the SQL statement sent to the database as well as the error.
Response
string
The error message for the most recent query.
test
Test to see if the connector is available.
test() : boolean
since |
1.7.0 |
---|---|
deprecated |
4.0 - Use JDatabaseDriver::isSupported() instead. |
Response
boolean
True on success, false otherwise.
transactionCommit
Method to commit a transaction.
transactionCommit(boolean $toSavepoint = false) : void
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $toSavepoint
boolean
If true, commit to the last savepoint.
transactionRollback
Method to roll back a transaction.
transactionRollback(boolean $toSavepoint = false) : void
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $toSavepoint
boolean
If true, rollback to the last savepoint.
transactionStart
Method to initialize a transaction.
transactionStart(boolean $asSavepoint = false) : void
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $asSavepoint
boolean
If true and a transaction is already active, a savepoint will be created.
truncateTable
Method to truncate a table.
truncateTable(string $table) : void
since |
1.7.3 |
---|---|
throws |
|
Arguments
- $table
string
The table to truncate
unlockTables
Unlocks tables in the database.
unlockTables() : \JDatabaseDriver
since |
2.5.0 |
---|---|
throws |
|
Response
\JDatabaseDriver
Returns this object to support chaining.
updateObject
Updates a row in a table based on an object's properties.
updateObject(string $table, &$object, array|string $key, boolean $nulls = false) : boolean
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $table
string
The name of the database table to update.- $object
- $key
array|string
The name of the primary key.- $nulls
boolean
True to update null fields or false to ignore them.
Response
boolean
True on success.
Properties
name
The name of the database driver.
since |
1.7.0 |
---|
Type(s)
string
serverType
The type of the database server family supported by this driver. Examples: mysql, oracle, postgresql, mssql, sqlite.
since |
---|
Type(s)
string
nameQuote
The character(s) used to quote SQL statement names such as table names or field names, etc. The child classes should define this as necessary. If a single character string the same character is used for both sides of the quoted name, else the first character will be used for the opening quote and the second for the closing quote.
since |
1.7.0 |
---|
Type(s)
string
connection
The database connection resource.
since |
1.7.0 |
---|
Type(s)
resource
nullDate
The null or zero representation of a timestamp for the database driver. This should be defined in child classes to hold the appropriate value for the engine.
since |
1.7.0 |
---|
Type(s)
string
prepared
The prepared statement.
since |
3.0.0 |
---|
Type(s)
resource
executed
Contains the current query execution status
since |
3.0.0 |
---|
Type(s)
array
_database
The name of the database.
since |
2.5.0 |
---|
Type(s)
string
count
The number of SQL statements executed by the database driver.
since |
1.7.0 |
---|
Type(s)
integer
cursor
The database connection cursor from the last query.
since |
1.7.0 |
---|
Type(s)
resource
debug
The database driver debugging state.
since |
1.7.0 |
---|
Type(s)
boolean
limit
The affected row limit for the current SQL statement.
since |
1.7.0 |
---|
Type(s)
integer
log
The log of executed SQL statements by the database driver.
since |
1.7.0 |
---|
Type(s)
array
timings
The log of executed SQL statements timings (start and stop microtimes) by the database driver.
since |
---|
Type(s)
array
callStacks
The log of executed SQL statements timings (start and stop microtimes) by the database driver.
since |
---|
Type(s)
array
offset
The affected row offset to apply for the current SQL statement.
since |
1.7.0 |
---|
Type(s)
integer
options
Passed in upon instantiation and saved.
since |
1.7.0 |
---|
Type(s)
array
tablePrefix
The common database table prefix.
since |
1.7.0 |
---|
Type(s)
string
utf
True if the database engine supports UTF-8 character encoding.
since |
1.7.0 |
---|
Type(s)
boolean
utf8mb4
True if the database engine supports UTF-8 Multibyte (utf8mb4) character encoding.
since |
---|
Type(s)
boolean
errorNum
The database error number
since |
1.7.0 |
---|---|
deprecated |
3.0.0 |
Type(s)
integer
errorMsg
The database error message
since |
1.7.0 |
---|---|
deprecated |
3.0.0 |
Type(s)
string
instances
JDatabaseDriver instances container.
since |
1.7.0 |
---|
Type(s)
array
dbMinimum
The minimum supported database version.
since |
3.0.0 |
---|
Type(s)
string
transactionDepth
The depth of the current transaction.
since |
3.1.4 |
---|
Type(s)
integer
disconnectHandlers
List of callables to call just before disconnecting database
since |
---|
Type(s)
array<mixed,callable>