Class JDatabaseDriverSqlite

Description

SQLite database driver

Located in /libraries/joomla/database/driver/sqlite.php (line 20)

JDatabase
   |
   --JDatabaseDriver
      |
      --JDatabaseDriverPdo
         |
         --JDatabaseDriverSqlite
Variable Summary
 string $name
 string $nameQuote
Method Summary
 static boolean isSupported ()
 void __destruct ()
 void disconnect ()
 JDatabaseDriverSqlite dropTable (string $tableName, [boolean $ifExists = true])
 string escape (string $text, [boolean $extra = false])
 mixed getCollation ()
 array getTableColumns (string $table, [boolean $typeOnly = true])
 array getTableCreate (mixed $tables)
 array getTableKeys (string $table)
 array getTableList ()
 string getVersion ()
 JDatabaseDriverSqlite lockTable (string $table)
 JDatabaseDriverSqlite renameTable (string $oldTable, string $newTable, [string $backup = null], [string $prefix = null])
 boolean select (string $database)
 boolean setUTF ()
 void transactionCommit ([boolean $toSavepoint = false])
 void transactionRollback ([boolean $toSavepoint = false])
 void transactionStart ([boolean $asSavepoint = false])
Variables
string $name = 'sqlite' (line 28)

The name of the database driver.

  • since: 12.1
  • access: public

Redefinition of:
JDatabaseDriverPdo::$name
The name of the database driver.
string $nameQuote = '`' (line 39)

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: 12.1
  • access: protected

Redefinition of:
JDatabaseDriverPdo::$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.

Inherited Variables

Inherited from JDatabaseDriverPdo

JDatabaseDriverPdo::$executed
JDatabaseDriverPdo::$nullDate
JDatabaseDriverPdo::$prepared

Inherited from JDatabaseDriver

JDatabaseDriver::$callStacks
JDatabaseDriver::$connection
JDatabaseDriver::$count
JDatabaseDriver::$cursor
JDatabaseDriver::$dbMinimum
JDatabaseDriver::$debug
JDatabaseDriver::$disconnectHandlers
JDatabaseDriver::$errorMsg
JDatabaseDriver::$errorNum
JDatabaseDriver::$instances
JDatabaseDriver::$limit
JDatabaseDriver::$log
JDatabaseDriver::$offset
JDatabaseDriver::$options
JDatabaseDriver::$sql
JDatabaseDriver::$tablePrefix
JDatabaseDriver::$timings
JDatabaseDriver::$transactionDepth
JDatabaseDriver::$utf
Methods
static isSupported (line 378)

Test to see if the PDO ODBC connector is available.

  • return: True on success, false otherwise.
  • since: 12.1
  • access: public
static boolean isSupported ()

Redefinition of:
JDatabaseDriverPdo::isSupported()
Test to see if the PDO extension is available.
Destructor __destruct (line 46)

Destructor.

  • since: 12.1
  • access: public
void __destruct ()

Redefinition of:
JDatabaseDriverPdo::__destruct()
Destructor.
disconnect (line 59)

Disconnects the database.

  • since: 12.1
  • access: public
void disconnect ()

Redefinition of:
JDatabaseDriverPdo::disconnect()
Disconnects the database.
dropTable (line 75)

Drops a table from the database.

  • return: Returns this object to support chaining.
  • since: 12.1
  • access: public
JDatabaseDriverSqlite dropTable (string $tableName, [boolean $ifExists = true])
  • string $tableName: The name of the database table to drop.
  • boolean $ifExists: Optionally specify that the table must exist before it is dropped.

Redefinition of:
JDatabaseDriver::dropTable()
Drops a table from the database.
escape (line 101)

Method to escape a string for usage in an SQLite statement.

Note: Using query objects with bound variables is preferable to the below.

  • return: The escaped string.
  • since: 12.1
  • access: public
string escape (string $text, [boolean $extra = false])
  • string $text: The string to be escaped.
  • boolean $extra: Unused optional parameter to provide extra escaping.

Redefinition of:
JDatabaseDriverPdo::escape()
Method to escape a string for usage in an SQL statement.
getCollation (line 118)

Method to get the database collation in use by sampling a text field of a table in the database.

  • return: The collation in use by the database or boolean false if not supported.
  • since: 12.1
  • access: public
mixed getCollation ()

Redefinition of:
JDatabaseDriver::getCollation()
Method to get the database collation in use by sampling a text field of a table in the database.
getTableColumns (line 156)

Retrieves field information about a given table.

  • return: An array of fields for the database table.
  • since: 12.1
  • throws: RuntimeException
  • access: public
array getTableColumns (string $table, [boolean $typeOnly = true])
  • string $table: The name of the database table.
  • boolean $typeOnly: True to only return field types.

Redefinition of:
JDatabaseDriver::getTableColumns()
Retrieves field information about the given tables.
getTableCreate (line 135)

Shows the table CREATE statement that creates the given tables.

Note: Doesn't appear to have support in SQLite

  • return: A list of the create SQL for the tables.
  • since: 12.1
  • throws: RuntimeException
  • access: public
array getTableCreate (mixed $tables)
  • mixed $tables: A table name or a list of table names.

Redefinition of:
JDatabaseDriver::getTableCreate()
Shows the table CREATE statement that creates the given tables.
getTableKeys (line 212)

Get the details list of keys for a table.

  • return: An array of the column specification for the table.
  • since: 12.1
  • throws: RuntimeException
  • access: public
array getTableKeys (string $table)
  • string $table: The name of the table.

Redefinition of:
JDatabaseDriver::getTableKeys()
Retrieves field information about the given tables.
getTableList (line 252)

Method to get an array of all tables in the database (schema).

  • return: An array of all the tables in the database.
  • since: 12.1
  • throws: RuntimeException
  • access: public
array getTableList ()

Redefinition of:
JDatabaseDriver::getTableList()
Method to get an array of all tables in the database.
getVersion (line 279)

Get the version of the database connector.

  • return: The database connector version.
  • since: 12.1
  • access: public
string getVersion ()

Redefinition of:
JDatabaseDriver::getVersion()
Get the version of the database connector
lockTable (line 333)

Locks a table in the database.

  • return: Returns this object to support chaining.
  • since: 12.1
  • throws: RuntimeException
  • access: public
JDatabaseDriverSqlite lockTable (string $table)
  • string $table: The name of the table to unlock.

Redefinition of:
JDatabaseDriver::lockTable()
Locks a table in the database.
renameTable (line 351)

Renames a table in the database.

  • return: Returns this object to support chaining.
  • since: 12.1
  • throws: RuntimeException
  • access: public
JDatabaseDriverSqlite renameTable (string $oldTable, string $newTable, [string $backup = null], [string $prefix = null])
  • string $oldTable: The name of the table to be renamed
  • string $newTable: The new name for the table.
  • string $backup: Not used by Sqlite.
  • string $prefix: Not used by Sqlite.

Redefinition of:
JDatabaseDriver::renameTable()
Renames a table in the database.
select (line 298)

Select a database for use.

  • return: True if the database was successfully selected.
  • since: 12.1
  • throws: RuntimeException
  • access: public
boolean select (string $database)
  • string $database: The name of the database to select for use.

Redefinition of:
JDatabaseDriverPdo::select()
Select a database for use.
setUTF (line 316)

Set the connection to use UTF-8 character encoding.

Returns false automatically for the Oracle driver since you can only set the character set when the connection is created.

  • return: True on success.
  • since: 12.1
  • access: public
boolean setUTF ()

Redefinition of:
JDatabaseDriverPdo::setUTF()
Set the connection to use UTF-8 character encoding.
transactionCommit (line 393)

Method to commit a transaction.

  • since: 12.3
  • throws: RuntimeException
  • access: public
void transactionCommit ([boolean $toSavepoint = false])
  • boolean $toSavepoint: If true, commit to the last savepoint.

Redefinition of:
JDatabaseDriverPdo::transactionCommit()
Method to commit a transaction.
transactionRollback (line 417)

Method to roll back a transaction.

  • since: 12.3
  • throws: RuntimeException
  • access: public
void transactionRollback ([boolean $toSavepoint = false])
  • boolean $toSavepoint: If true, rollback to the last savepoint.

Redefinition of:
JDatabaseDriverPdo::transactionRollback()
Method to roll back a transaction.
transactionStart (line 447)

Method to initialize a transaction.

  • since: 12.3
  • throws: RuntimeException
  • access: public
void transactionStart ([boolean $asSavepoint = false])
  • boolean $asSavepoint: If true and a transaction is already active, a savepoint will be created.

Redefinition of:
JDatabaseDriverPdo::transactionStart()
Method to initialize a transaction.
unlockTables (line 366)

Unlocks tables in the database.

  • return: Returns this object to support chaining.
  • since: 12.1
  • throws: RuntimeException
  • access: public
JDatabaseDriverSqlite unlockTables ()

Redefinition of:
JDatabaseDriver::unlockTables()
Unlocks tables in the database.

Inherited Methods

Inherited From JDatabaseDriverPdo

 JDatabaseDriverPdo::__construct()
 JDatabaseDriverPdo::connect()
 JDatabaseDriverPdo::connected()
 JDatabaseDriverPdo::disconnect()
 JDatabaseDriverPdo::escape()
 JDatabaseDriverPdo::execute()
 JDatabaseDriverPdo::fetchArray()
 JDatabaseDriverPdo::fetchAssoc()
 JDatabaseDriverPdo::fetchObject()
 JDatabaseDriverPdo::freeResult()
 JDatabaseDriverPdo::getAffectedRows()
 JDatabaseDriverPdo::getConnectedQuery()
 JDatabaseDriverPdo::getNumRows()
 JDatabaseDriverPdo::getOption()
 JDatabaseDriverPdo::insertid()
 JDatabaseDriverPdo::isSupported()
 JDatabaseDriverPdo::loadNextAssoc()
 JDatabaseDriverPdo::loadNextObject()
 JDatabaseDriverPdo::loadNextRow()
 JDatabaseDriverPdo::select()
 JDatabaseDriverPdo::setOption()
 JDatabaseDriverPdo::setQuery()
 JDatabaseDriverPdo::setUTF()
 JDatabaseDriverPdo::transactionCommit()
 JDatabaseDriverPdo::transactionRollback()
 JDatabaseDriverPdo::transactionStart()
 JDatabaseDriverPdo::__destruct()
 JDatabaseDriverPdo::__sleep()
 JDatabaseDriverPdo::__wakeup()

Inherited From JDatabaseDriver

 JDatabaseDriver::__construct()
 JDatabaseDriver::addDisconnectHandler()
 JDatabaseDriver::alterDbCharacterSet()
 JDatabaseDriver::connect()
 JDatabaseDriver::connected()
 JDatabaseDriver::createDatabase()
 JDatabaseDriver::disconnect()
 JDatabaseDriver::dropTable()
 JDatabaseDriver::escape()
 JDatabaseDriver::execute()
 JDatabaseDriver::fetchArray()
 JDatabaseDriver::fetchAssoc()
 JDatabaseDriver::fetchObject()
 JDatabaseDriver::freeResult()
 JDatabaseDriver::getAffectedRows()
 JDatabaseDriver::getAlterDbCharacterSet()
 JDatabaseDriver::getCallStacks()
 JDatabaseDriver::getCollation()
 JDatabaseDriver::getConnection()
 JDatabaseDriver::getConnectors()
 JDatabaseDriver::getCount()
 JDatabaseDriver::getCreateDatabaseQuery()
 JDatabaseDriver::getDatabase()
 JDatabaseDriver::getDateFormat()
 JDatabaseDriver::getExporter()
 JDatabaseDriver::getImporter()
 JDatabaseDriver::getInstance()
 JDatabaseDriver::getIterator()
 JDatabaseDriver::getLog()
 JDatabaseDriver::getMinimum()
 JDatabaseDriver::getNullDate()
 JDatabaseDriver::getNumRows()
 JDatabaseDriver::getPrefix()
 JDatabaseDriver::getQuery()
 JDatabaseDriver::getTableColumns()
 JDatabaseDriver::getTableCreate()
 JDatabaseDriver::getTableKeys()
 JDatabaseDriver::getTableList()
 JDatabaseDriver::getTimings()
 JDatabaseDriver::getUTFSupport()
 JDatabaseDriver::getVersion()
 JDatabaseDriver::hasUTFSupport()
 JDatabaseDriver::insertid()
 JDatabaseDriver::insertObject()
 JDatabaseDriver::isMinimumVersion()
 JDatabaseDriver::loadAssoc()
 JDatabaseDriver::loadAssocList()
 JDatabaseDriver::loadColumn()
 JDatabaseDriver::loadNextObject()
 JDatabaseDriver::loadNextRow()
 JDatabaseDriver::loadObject()
 JDatabaseDriver::loadObjectList()
 JDatabaseDriver::loadResult()
 JDatabaseDriver::loadRow()
 JDatabaseDriver::loadRowList()
 JDatabaseDriver::lockTable()
 JDatabaseDriver::quote()
 JDatabaseDriver::quoteName()
 JDatabaseDriver::quoteNameStr()
 JDatabaseDriver::renameTable()
 JDatabaseDriver::replacePrefix()
 JDatabaseDriver::select()
 JDatabaseDriver::setDebug()
 JDatabaseDriver::setQuery()
 JDatabaseDriver::setUTF()
 JDatabaseDriver::splitSql()
 JDatabaseDriver::transactionCommit()
 JDatabaseDriver::transactionRollback()
 JDatabaseDriver::transactionStart()
 JDatabaseDriver::truncateTable()
 JDatabaseDriver::unlockTables()
 JDatabaseDriver::updateObject()
 JDatabaseDriver::__call()

Inherited From JDatabase

 JDatabase::getConnectors()
 JDatabase::getErrorMsg()
 JDatabase::getErrorNum()
 JDatabase::getInstance()
 JDatabase::query()
 JDatabase::splitSql()
 JDatabase::stderr()
 JDatabase::test()

Documentation generated on Tue, 19 Nov 2013 15:14:08 +0100 by phpDocumentor 1.4.3