MediaWiki  REL1_22
MockDatabaseSqlite Class Reference
Inheritance diagram for MockDatabaseSqlite:
Collaboration diagram for MockDatabaseSqlite:

List of all members.

Public Member Functions

 __construct ()
 query ($sql, $fname= '', $tempIgnore=false)
 Run an SQL query and return the result.
 replaceVars ($s)
 Override parent visibility to public.

Public Attributes

 $lastQuery

Detailed Description

Definition at line 3 of file DatabaseSqliteTest.php.


Constructor & Destructor Documentation

Definition at line 6 of file DatabaseSqliteTest.php.


Member Function Documentation

MockDatabaseSqlite::query ( sql,
fname = '',
tempIgnore = false 
)

Run an SQL query and return the result.

Normally throws a DBQueryError on failure. If errors are ignored, returns false instead.

In new code, the query wrappers select(), insert(), update(), delete(), etc. should be used where possible, since they give much better DBMS independence and automatically quote or validate user input in a variety of contexts. This function is generally only useful for queries which are explicitly DBMS-dependent and are unsupported by the query wrappers, such as CREATE TABLE.

However, the query wrappers themselves should call this function.

Parameters:
$sqlString: SQL query
$fnameString: Name of the calling function, for profiling/SHOW PROCESSLIST comment (you can use __METHOD__ or add some extra info)
$tempIgnoreBoolean: Whether to avoid throwing an exception on errors... maybe best to catch the exception instead?
Exceptions:
MWException
Returns:
boolean|ResultWrapper. true for a successful write query, ResultWrapper object for a successful read query, or false on failure if $tempIgnore set

Reimplemented from DatabaseBase.

Definition at line 10 of file DatabaseSqliteTest.php.

References DatabaseBase\lastQuery().

Referenced by DatabaseSqliteTest\getColumns(), DatabaseSqliteTest\getIndexes(), and DatabaseSqliteTest\testCaseInsensitiveLike().

Override parent visibility to public.

Reimplemented from DatabaseSqlite.

Definition at line 19 of file DatabaseSqliteTest.php.

References $s.


Member Data Documentation

MockDatabaseSqlite::$lastQuery

Definition at line 4 of file DatabaseSqliteTest.php.


The documentation for this class was generated from the following file: