MediaWiki
REL1_22
|
Public Member Functions | |
__construct ($server=false, $user=false, $password=false, $dbName=false, $flags=0) | |
Constructor. | |
addQuotes ($s) | |
affectedRows () | |
attachDatabase ($name, $file=false, $fname=__METHOD__) | |
Attaches external database to our connection, see http://sqlite.org/lang_attach.html for details. | |
buildConcat ($stringList) | |
Build a concatenation list to feed into a SQL query. | |
buildLike () | |
checkForEnabledSearch () | |
Check if the searchindext table is FTS enabled. | |
dataSeek ($res, $row) | |
deadlockLoop () | |
No-op version of deadlockLoop. | |
decodeBlob ($b) | |
duplicateTableStructure ($oldName, $newName, $temporary=false, $fname=__METHOD__) | |
encodeBlob ($b) | |
fetchObject ($res) | |
fetchRow ($res) | |
fieldInfo ($table, $field) | |
Get information about a given field Returns false if the field does not exist. | |
fieldName ($res, $n) | |
freeResult ($res) | |
getSearchEngine () | |
getServerInfo () | |
getServerVersion () | |
getSoftwareLink () | |
getType () | |
implicitGroupby () | |
indexInfo ($table, $index, $fname=__METHOD__) | |
Returns information about an index Returns false if the index does not exist. | |
indexName ($index) | |
Index names have DB scope. | |
indexUnique ($table, $index, $fname=__METHOD__) | |
insert ($table, $a, $fname=__METHOD__, $options=array()) | |
Based on generic method (parent) with some prior SQLite-sepcific adjustments. | |
insertId () | |
This must be called after nextSequenceVal. | |
isWriteQuery ($sql) | |
lastErrno () | |
lastError () | |
listTables ($prefix=null, $fname=__METHOD__) | |
List all tables on the database. | |
makeInsertOptions ($options) | |
makeSelectOptions ($options) | |
Filter the options used in SELECT statements. | |
makeUpdateOptions ($options) | |
numFields ($res) | |
numRows ($res) | |
The PDO::Statement class implements the array interface so count() will work. | |
open ($server, $user, $pass, $dbName) | |
Open an SQLite database and return a resource handle to it NOTE: only $dbName is used, the other parameters are irrelevant for SQLite databases. | |
openFile ($fileName) | |
Opens a database file. | |
replace ($table, $uniqueIndexes, $rows, $fname=__METHOD__) | |
strencode ($s) | |
tableName ($name, $format= 'quoted') | |
Use MySQL's naming (accounts for prefix etc) but remove surrounding backticks. | |
textFieldSize ($table, $field) | |
Returns the size of a text field, or -1 for "unlimited" In SQLite this is SQLITE_MAX_LENGTH, by default 1GB. | |
unionQueries ($sqls, $all) | |
unionSupportsOrderAndLimit () | |
wasDeadlock () | |
wasErrorReissuable () | |
wasReadOnlyError () | |
Static Public Member Functions | |
static | fixIgnore ($options) |
static | generateFileName ($dir, $dbName) |
Generates a database file name. | |
static | getFulltextSearchModule () |
Returns version of currently supported SQLite fulltext search module or false if none present. | |
Public Attributes | |
$mAffectedRows | |
$mDatabaseFile | |
$mLastResult | |
$mName | |
Protected Member Functions | |
closeConnection () | |
Does not actually close the connection, just destroys the reference for GC to do its work. | |
doBegin ($fname= '') | |
Issues the BEGIN command to the database server. | |
doCommit ($fname= '') | |
Issues the COMMIT command to the database server. | |
doQuery ($sql) | |
SQLite doesn't allow buffered results or data seeking etc, so we'll use fetchAll as the result. | |
doRollback ($fname= '') | |
Issues the ROLLBACK command to the database server. | |
replaceVars ($s) | |
Protected Attributes | |
PDO | $mConn |
Static Private Attributes | |
static | $fulltextEnabled = null |
Definition at line 28 of file DatabaseSqlite.php.
DatabaseSqlite::__construct | ( | $ | server = false , |
$ | user = false , |
||
$ | password = false , |
||
$ | dbName = false , |
||
$ | flags = 0 |
||
) |
Constructor.
Parameters $server, $user and $password are not used.
$server | string |
$user | string |
$password | string |
$dbName | string |
$flags | int |
Definition at line 50 of file DatabaseSqlite.php.
DatabaseSqlite::addQuotes | ( | $ | s | ) |
$s | Blob|string |
Reimplemented from DatabaseBase.
Definition at line 717 of file DatabaseSqlite.php.
DatabaseSqlite::attachDatabase | ( | $ | name, |
$ | file = false , |
||
$ | fname = __METHOD__ |
||
) |
Attaches external database to our connection, see http://sqlite.org/lang_attach.html for details.
string | $name | database name to be used in queries like SELECT foo FROM dbname.table |
string | $file | database file name. If omitted, will be generated using $name and $wgSQLiteDataDir |
string | $fname | calling function name |
Definition at line 203 of file DatabaseSqlite.php.
DatabaseSqlite::buildConcat | ( | $ | stringList | ) |
Build a concatenation list to feed into a SQL query.
$stringList | array |
Reimplemented from DatabaseBase.
Definition at line 816 of file DatabaseSqlite.php.
Check if the searchindext table is FTS enabled.
Definition at line 159 of file DatabaseSqlite.php.
DatabaseSqlite::closeConnection | ( | ) | [protected] |
Does not actually close the connection, just destroys the reference for GC to do its work.
Reimplemented from DatabaseBase.
Definition at line 140 of file DatabaseSqlite.php.
DatabaseSqlite::dataSeek | ( | $ | res, |
$ | row | ||
) |
$res | ResultWrapper |
$row |
Implements DatabaseType.
Definition at line 372 of file DatabaseSqlite.php.
No-op version of deadlockLoop.
Reimplemented from DatabaseBase.
Definition at line 757 of file DatabaseSqlite.php.
DatabaseSqlite::decodeBlob | ( | $ | b | ) |
$b | Blob|string |
Reimplemented from DatabaseBase.
Definition at line 706 of file DatabaseSqlite.php.
DatabaseSqlite::doBegin | ( | $ | fname = '' | ) | [protected] |
Issues the BEGIN command to the database server.
type | $fname |
Reimplemented from DatabaseBase.
Definition at line 654 of file DatabaseSqlite.php.
References DatabaseBase\commit().
DatabaseSqlite::doCommit | ( | $ | fname = '' | ) | [protected] |
Issues the COMMIT command to the database server.
type | $fname |
Reimplemented from DatabaseBase.
Definition at line 666 of file DatabaseSqlite.php.
DatabaseSqlite::doQuery | ( | $ | sql | ) | [protected] |
SQLite doesn't allow buffered results or data seeking etc, so we'll use fetchAll as the result.
$sql | string |
Reimplemented from DatabaseBase.
Definition at line 230 of file DatabaseSqlite.php.
DatabaseSqlite::doRollback | ( | $ | fname = '' | ) | [protected] |
Issues the ROLLBACK command to the database server.
type | $fname |
Reimplemented from DatabaseBase.
Definition at line 678 of file DatabaseSqlite.php.
DatabaseSqlite::duplicateTableStructure | ( | $ | oldName, |
$ | newName, | ||
$ | temporary = false , |
||
$ | fname = __METHOD__ |
||
) |
MWException |
$oldName | |
$newName | |
$temporary | bool |
$fname | string |
Reimplemented from DatabaseBase.
Definition at line 828 of file DatabaseSqlite.php.
DatabaseSqlite::encodeBlob | ( | $ | b | ) |
$b |
Reimplemented from DatabaseBase.
Definition at line 698 of file DatabaseSqlite.php.
DatabaseSqlite::fetchObject | ( | $ | res | ) |
$res | ResultWrapper |
Implements DatabaseType.
Definition at line 257 of file DatabaseSqlite.php.
DatabaseSqlite::fetchRow | ( | $ | res | ) |
$res | ResultWrapper |
Implements DatabaseType.
Definition at line 283 of file DatabaseSqlite.php.
DatabaseSqlite::fieldInfo | ( | $ | table, |
$ | field | ||
) |
Get information about a given field Returns false if the field does not exist.
$table | string |
$field | string |
Implements DatabaseType.
Definition at line 642 of file DatabaseSqlite.php.
DatabaseSqlite::fieldName | ( | $ | res, |
$ | n | ||
) |
$res | ResultWrapper |
$n |
Implements DatabaseType.
Definition at line 323 of file DatabaseSqlite.php.
static DatabaseSqlite::fixIgnore | ( | $ | options | ) | [static] |
DatabaseSqlite::freeResult | ( | $ | res | ) |
$res | ResultWrapper |
Reimplemented from DatabaseBase.
Definition at line 245 of file DatabaseSqlite.php.
static DatabaseSqlite::generateFileName | ( | $ | dir, |
$ | dbName | ||
) | [static] |
Generates a database file name.
Explicitly public for installer.
string | $dir | Directory where database resides |
string | $dbName | Database name |
Definition at line 151 of file DatabaseSqlite.php.
static DatabaseSqlite::getFulltextSearchModule | ( | ) | [static] |
Returns version of currently supported SQLite fulltext search module or false if none present.
Definition at line 176 of file DatabaseSqlite.php.
Referenced by RebuildTextIndex\execute(), and SqliteUpdater\sqliteSetupSearchindex().
Reimplemented from DatabaseBase.
Definition at line 630 of file DatabaseSqlite.php.
Implements DatabaseType.
Definition at line 622 of file DatabaseSqlite.php.
Implements DatabaseType.
Definition at line 615 of file DatabaseSqlite.php.
Reimplemented from DatabaseBase.
Definition at line 74 of file DatabaseSqlite.php.
DatabaseSqlite::indexInfo | ( | $ | table, |
$ | index, | ||
$ | fname = __METHOD__ |
||
) |
Returns information about an index Returns false if the index does not exist.
Implements DatabaseType.
Definition at line 423 of file DatabaseSqlite.php.
DatabaseSqlite::indexName | ( | $ | index | ) |
Index names have DB scope.
$index | string |
Reimplemented from DatabaseBase.
Definition at line 354 of file DatabaseSqlite.php.
DatabaseSqlite::indexUnique | ( | $ | table, |
$ | index, | ||
$ | fname = __METHOD__ |
||
) |
$table | |
$index | |
$fname | string |
Definition at line 445 of file DatabaseSqlite.php.
DatabaseSqlite::insert | ( | $ | table, |
$ | a, | ||
$ | fname = __METHOD__ , |
||
$ | options = array() |
||
) |
Based on generic method (parent) with some prior SQLite-sepcific adjustments.
Reimplemented from DatabaseBase.
Definition at line 517 of file DatabaseSqlite.php.
This must be called after nextSequenceVal.
Implements DatabaseType.
Definition at line 363 of file DatabaseSqlite.php.
DatabaseSqlite::isWriteQuery | ( | $ | sql | ) |
$sql | string |
Reimplemented from DatabaseBase.
Definition at line 219 of file DatabaseSqlite.php.
DatabaseSqlite::listTables | ( | $ | prefix = null , |
$ | fname = __METHOD__ |
||
) |
List all tables on the database.
string | $prefix | Only show tables with this prefix, e.g. mw_ |
string | $fname | calling function name |
Reimplemented from DatabaseBase.
Definition at line 854 of file DatabaseSqlite.php.
Referenced by DatabaseSqliteTest\getTables().
DatabaseSqlite::makeInsertOptions | ( | $ | options | ) |
$options | array |
Reimplemented from DatabaseBase.
Definition at line 508 of file DatabaseSqlite.php.
DatabaseSqlite::makeSelectOptions | ( | $ | options | ) |
Filter the options used in SELECT statements.
$options | array |
Reimplemented from DatabaseBase.
Definition at line 472 of file DatabaseSqlite.php.
DatabaseSqlite::makeUpdateOptions | ( | $ | options | ) |
$options | array |
Reimplemented from DatabaseBase.
Definition at line 485 of file DatabaseSqlite.php.
DatabaseSqlite::numFields | ( | $ | res | ) |
$res | ResultWrapper |
Implements DatabaseType.
Definition at line 313 of file DatabaseSqlite.php.
DatabaseSqlite::numRows | ( | $ | res | ) |
The PDO::Statement class implements the array interface so count() will work.
$res | ResultWrapper |
Implements DatabaseType.
Definition at line 304 of file DatabaseSqlite.php.
DatabaseSqlite::open | ( | $ | server, |
$ | user, | ||
$ | pass, | ||
$ | dbName | ||
) |
Open an SQLite database and return a resource handle to it NOTE: only $dbName is used, the other parameters are irrelevant for SQLite databases.
string | $server | |
string | $user | |
string | $pass | |
string | $dbName |
DBConnectionError |
Implements DatabaseType.
Definition at line 89 of file DatabaseSqlite.php.
DatabaseSqlite::openFile | ( | $ | fileName | ) |
Opens a database file.
$fileName | string |
DBConnectionError |
Definition at line 110 of file DatabaseSqlite.php.
Referenced by DatabaseSqliteStandalone\__construct().
DatabaseSqlite::replace | ( | $ | table, |
$ | uniqueIndexes, | ||
$ | rows, | ||
$ | fname = __METHOD__ |
||
) |
$table | |
$uniqueIndexes | |
$rows | |
$fname | string |
Reimplemented from DatabaseBase.
Definition at line 544 of file DatabaseSqlite.php.
DatabaseSqlite::replaceVars | ( | $ | s | ) | [protected] |
$s | string |
Reimplemented from DatabaseBase.
Reimplemented in MockDatabaseSqlite.
Definition at line 767 of file DatabaseSqlite.php.
DatabaseSqlite::strencode | ( | $ | s | ) |
$s | string |
Implements DatabaseType.
Definition at line 690 of file DatabaseSqlite.php.
DatabaseSqlite::tableName | ( | $ | name, |
$ | format = 'quoted' |
||
) |
Use MySQL's naming (accounts for prefix etc) but remove surrounding backticks.
$name | |
$format | String |
Reimplemented from DatabaseBase.
Definition at line 339 of file DatabaseSqlite.php.
DatabaseSqlite::textFieldSize | ( | $ | table, |
$ | field | ||
) |
Returns the size of a text field, or -1 for "unlimited" In SQLite this is SQLITE_MAX_LENGTH, by default 1GB.
No way to query it though.
Reimplemented from DatabaseBase.
Definition at line 570 of file DatabaseSqlite.php.
DatabaseSqlite::unionQueries | ( | $ | sqls, |
$ | all | ||
) |
$sqls | |
$all |
Reimplemented from DatabaseBase.
Definition at line 586 of file DatabaseSqlite.php.
DatabaseSqlite::$fulltextEnabled = null [static, private] |
Definition at line 30 of file DatabaseSqlite.php.
DatabaseSqlite::$mAffectedRows |
Definition at line 32 of file DatabaseSqlite.php.
PDO DatabaseSqlite::$mConn [protected] |
Reimplemented from DatabaseBase.
Definition at line 39 of file DatabaseSqlite.php.
DatabaseSqlite::$mDatabaseFile |
Definition at line 34 of file DatabaseSqlite.php.
DatabaseSqlite::$mLastResult |
Definition at line 33 of file DatabaseSqlite.php.
DatabaseSqlite::$mName |
Definition at line 35 of file DatabaseSqlite.php.