[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
This is the SQLite database abstraction layer. See maintenance/sqlite/README for development notes and other specific information This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 1035 lines (25 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
DatabaseSqlite:: (60 methods):
__construct()
getType()
implicitGroupby()
open()
openFile()
closeConnection()
generateFileName()
checkForEnabledSearch()
getFulltextSearchModule()
attachDatabase()
isWriteQuery()
doQuery()
freeResult()
fetchObject()
fetchRow()
numRows()
numFields()
fieldName()
tableName()
indexName()
insertId()
dataSeek()
lastError()
lastErrno()
affectedRows()
indexInfo()
indexUnique()
makeSelectOptions()
makeUpdateOptionsArray()
fixIgnore()
makeInsertOptions()
insert()
replace()
textFieldSize()
unionSupportsOrderAndLimit()
unionQueries()
wasDeadlock()
wasErrorReissuable()
wasReadOnlyError()
getSoftwareLink()
getServerVersion()
getServerInfo()
fieldInfo()
doBegin()
doCommit()
doRollback()
strencode()
encodeBlob()
decodeBlob()
addQuotes()
buildLike()
getSearchEngine()
deadlockLoop()
replaceVars()
lock()
unlock()
buildConcat()
buildGroupConcatField()
duplicateTableStructure()
listTables()
DatabaseSqliteStandalone:: (1 method):
__construct()
SQLiteField:: (6 methods):
__construct()
name()
tableName()
defaultValue()
isNullable()
type()
Class: DatabaseSqlite - X-Ref
__construct( $p = null ) X-Ref |
No description |
getType() X-Ref |
return: string |
implicitGroupby() X-Ref |
return: bool |
open( $server, $user, $pass, $dbName ) X-Ref |
No description |
openFile( $fileName ) X-Ref |
Opens a database file param: string $fileName return: PDO|bool SQL connection or false if failed |
closeConnection() X-Ref |
Does not actually close the connection, just destroys the reference for GC to do its work return: bool |
generateFileName( $dir, $dbName ) X-Ref |
Generates a database file name. Explicitly public for installer. param: string $dir Directory where database resides param: string $dbName Database name return: string |
checkForEnabledSearch() X-Ref |
Check if the searchindext table is FTS enabled. return: bool False if not enabled. |
getFulltextSearchModule() X-Ref |
Returns version of currently supported SQLite fulltext search module or false if none present. return: string |
attachDatabase( $name, $file = false, $fname = __METHOD__ ) X-Ref |
Attaches external database to our connection, see http://sqlite.org/lang_attach.html for details. param: string $name Database name to be used in queries like param: bool|string $file Database file name. If omitted, will be generated param: string $fname Calling function name return: ResultWrapper |
isWriteQuery( $sql ) X-Ref |
param: string $sql return: bool |
doQuery( $sql ) X-Ref |
SQLite doesn't allow buffered results or data seeking etc, so we'll use fetchAll as the result param: string $sql return: bool|ResultWrapper |
freeResult( $res ) X-Ref |
param: ResultWrapper|mixed $res |
fetchObject( $res ) X-Ref |
param: ResultWrapper|array $res return: stdClass|bool |
fetchRow( $res ) X-Ref |
param: ResultWrapper|mixed $res return: array|bool |
numRows( $res ) X-Ref |
The PDO::Statement class implements the array interface so count() will work param: ResultWrapper|array $res return: int |
numFields( $res ) X-Ref |
param: ResultWrapper $res return: int |
fieldName( $res, $n ) X-Ref |
param: ResultWrapper $res param: int $n return: bool |
tableName( $name, $format = 'quoted' ) X-Ref |
Use MySQL's naming (accounts for prefix etc) but remove surrounding backticks param: string $name param: string $format return: string |
indexName( $index ) X-Ref |
Index names have DB scope param: string $index return: string |
insertId() X-Ref |
This must be called after nextSequenceVal return: int |
dataSeek( $res, $row ) X-Ref |
param: ResultWrapper|array $res param: int $row |
lastError() X-Ref |
return: string |
lastErrno() X-Ref |
return: string |
affectedRows() X-Ref |
return: int |
indexInfo( $table, $index, $fname = __METHOD__ ) X-Ref |
Returns information about an index Returns false if the index does not exist - if errors are explicitly ignored, returns NULL on failure param: string $table param: string $index param: string $fname return: array |
indexUnique( $table, $index, $fname = __METHOD__ ) X-Ref |
param: string $table param: string $index param: string $fname return: bool|null |
makeSelectOptions( $options ) X-Ref |
Filter the options used in SELECT statements param: array $options return: array |
makeUpdateOptionsArray( $options ) X-Ref |
param: array $options return: string |
fixIgnore( $options ) X-Ref |
param: array $options return: array |
makeInsertOptions( $options ) X-Ref |
param: array $options return: string |
insert( $table, $a, $fname = __METHOD__, $options = array() X-Ref |
Based on generic method (parent) with some prior SQLite-sepcific adjustments param: string $table param: array $a param: string $fname param: array $options return: bool |
replace( $table, $uniqueIndexes, $rows, $fname = __METHOD__ ) X-Ref |
param: string $table param: array $uniqueIndexes Unused param: string|array $rows param: string $fname return: bool|ResultWrapper |
textFieldSize( $table, $field ) X-Ref |
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. param: string $table param: string $field return: int |
unionSupportsOrderAndLimit() X-Ref |
return: bool |
unionQueries( $sqls, $all ) X-Ref |
param: string $sqls param: bool $all Whether to "UNION ALL" or not return: string |
wasDeadlock() X-Ref |
return: bool |
wasErrorReissuable() X-Ref |
return: bool |
wasReadOnlyError() X-Ref |
return: bool |
getSoftwareLink() X-Ref |
return: string Wikitext of a link to the server software's web site |
getServerVersion() X-Ref |
return: string Version information from the database |
getServerInfo() X-Ref |
return: string User-friendly database information |
fieldInfo( $table, $field ) X-Ref |
Get information about a given field Returns false if the field does not exist. param: string $table param: string $field return: SQLiteField|bool False on failure |
doBegin( $fname = '' ) X-Ref |
No description |
doCommit( $fname = '' ) X-Ref |
No description |
doRollback( $fname = '' ) X-Ref |
No description |
strencode( $s ) X-Ref |
param: string $s return: string |
encodeBlob( $b ) X-Ref |
param: string $b return: Blob |
decodeBlob( $b ) X-Ref |
param: Blob|string $b return: string |
addQuotes( $s ) X-Ref |
param: Blob|string $s return: string |
buildLike() X-Ref |
return: string |
getSearchEngine() X-Ref |
return: string |
deadlockLoop( ) X-Ref |
No-op version of deadlockLoop return: mixed |
replaceVars( $s ) X-Ref |
param: string $s return: string |
lock( $lockName, $method, $timeout = 5 ) X-Ref |
No description |
unlock( $lockName, $method ) X-Ref |
No description |
buildConcat( $stringList ) X-Ref |
Build a concatenation list to feed into a SQL query param: string[] $stringList return: string |
buildGroupConcatField($delim, $table, $field, $conds = '', $join_conds = array() X-Ref |
No description |
duplicateTableStructure( $oldName, $newName, $temporary = false, $fname = __METHOD__ ) X-Ref |
param: string $oldName param: string $newName param: bool $temporary param: string $fname return: bool|ResultWrapper |
listTables( $prefix = null, $fname = __METHOD__ ) X-Ref |
List all tables on the database param: string $prefix Only show tables with this prefix, e.g. mw_ param: string $fname Calling function name return: array |
Class: DatabaseSqliteStandalone - X-Ref
This class allows simple acccess to a SQLite database independently from main database settings__construct( $fileName, $flags = 0 ) X-Ref |
No description |
Class: SQLiteField - X-Ref
__construct( $info, $tableName ) X-Ref |
No description |
name() X-Ref |
No description |
tableName() X-Ref |
No description |
defaultValue() X-Ref |
No description |
isNullable() X-Ref |
return: bool |
type() X-Ref |
No description |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |