Go to the documentation of this file.
37 $lastSqls = implode(
'; ', $this->lastSqls );
38 $this->lastSqls =
array();
49 $this->lastSqls[] = trim( preg_replace(
50 '/\s{2,}(?=FROM|WHERE|GROUP BY|ORDER BY|LIMIT)|(?<=SELECT|INSERT|UPDATE)\s{2,}/',
56 if ( substr(
$fname, 0, strlen( $this->testName ) ) !== $this->testName ) {
57 throw new MWException(
'function name does not start with test class. ' .
58 $fname .
' vs. ' . $this->testName .
'. ' .
59 'Please provide __METHOD__ to database methods.' );
65 return str_replace(
"'",
"\'",
$s );
73 public function query( $sql,
$fname =
'', $tempIgnore =
false ) {
83 return in_array( $table, (
array)$this->tablesExists );
88 return parent::nativeReplace( $table, $rows,
$fname );
$testName
CLASS of the test suite, used to determine, if the function name is passed every time to query()
getType()
Get the type of the DBMS, as it appears in $wgDBtype.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
numFields( $res)
Get the number of fields in a result object.
fieldInfo( $table, $field)
mysql_fetch_field() wrapper Returns false if the field doesn't exist
getLastSqls()
Returns SQL queries grouped by '; ' Clear the list of queries that have been done so far.
if(!defined( 'MEDIAWIKI')) $fname
This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined.
doQuery( $sql)
The DBMS-dependent part of query()
__construct( $testName)
Constructor.
nativeReplace( $table, $rows, $fname)
REPLACE query wrapper for MySQL and SQLite, which have a native REPLACE statement.
fetchRow( $res)
Fetch the next row from the given result object, in associative array form.
tableExists( $table, $fname=__METHOD__)
Query whether a given table exists.
getSoftwareLink()
Returns a wikitext link to the DB's website, e.g., return "[http://www.mysql.com/ MySQL]"; Should at ...
strencode( $s)
Wrapper for addslashes()
lastError()
Get a description of the last error.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
$tablesExists
Array of tables to be considered as existing by tableExist() Use setExistingTables() to alter.
setExistingTables( $tablesExists)
query( $sql, $fname='', $tempIgnore=false)
Run an SQL query and return the result.
numRows( $res)
Get the number of rows in a result object.
getServerInfo()
A string describing the current software version, and possibly other details in a user-friendly way.
getServerVersion()
A string describing the current software version, like from mysql_get_server_info().
addIdentifierQuotes( $s)
Quotes an identifier using backticks or "double quotes" depending on the database type.
Database abstraction object.
insertId()
Get the inserted value of an auto-increment row.
checkFunctionName( $fname)
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
dataSeek( $res, $row)
Change the position of the cursor in a result object.
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code can override on output return false to not delete it return false to override the default password checks this Boolean value will be checked to determine if the password was valid return false to implement your own hashing method & $password
Helper for testing the methods from the DatabaseBase class.
fieldName( $res, $n)
Get a field name in a result object.
indexInfo( $table, $index, $fname='Database::indexInfo')
Get information about an index into an object.
$lastSqls
Array of lastSqls passed to query(), This is an array since some methods in DatabaseBase can do more ...
open( $server, $user, $password, $dbName)
Open a connection to the database.
closeConnection()
Closes underlying database connection.
affectedRows()
Get the number of rows affected by the last write query.
fetchObject( $res)
Fetch the next row from the given result object, in object form.
lastErrno()
Get the last error number.