MediaWiki  REL1_22
FakeDatabaseMysqlBase Class Reference

Fake class around abstract class so we can call concrete methods. More...

Inheritance diagram for FakeDatabaseMysqlBase:
Collaboration diagram for FakeDatabaseMysqlBase:

List of all members.

Public Member Functions

 affectedRows ()
 Get the number of rows affected by the last write query.
 getServerVersion ()
 A string describing the current software version, like from mysql_get_server_info().
 insertId ()
 Get the inserted value of an auto-increment row.
 lastErrno ()
 Get the last error number.

Protected Member Functions

 closeConnection ()
 Closes underlying database connection.
 doQuery ($sql)
 The DBMS-dependent part of query()
 mysqlConnect ($realServer)
 Open a connection to a MySQL server.
 mysqlDataSeek ($res, $row)
 Move internal result pointer.
 mysqlError ($conn=null)
 Returns the text of the error message from previous MySQL operation.
 mysqlFetchArray ($res)
 Fetch a result row as an associative and numeric array.
 mysqlFetchField ($res, $n)
 Get column information from a result.
 mysqlFetchObject ($res)
 Fetch a result row as an object.
 mysqlFieldName ($res, $n)
 Get the name of the specified field in a result.
 mysqlFreeResult ($res)
 Free result memory.
 mysqlNumFields ($res)
 Get number of fields in result.
 mysqlNumRows ($res)
 Get number of rows in result.
 mysqlPing ()
 Ping a server connection or reconnect if there is no connection.

Detailed Description

Fake class around abstract class so we can call concrete methods.

Definition at line 32 of file DatabaseMysqlBaseTest.php.


Member Function Documentation

Get the number of rows affected by the last write query.

See also:
http://www.php.net/mysql_affected_rows
Returns:
int

Implements DatabaseType.

Definition at line 53 of file DatabaseMysqlBaseTest.php.

Closes underlying database connection.

Since:
1.20
Returns:
bool: Whether connection was closed successfully

Reimplemented from DatabaseBase.

Definition at line 34 of file DatabaseMysqlBaseTest.php.

FakeDatabaseMysqlBase::doQuery ( sql) [protected]

The DBMS-dependent part of query()

Parameters:
$sqlString: SQL query.
Returns:
ResultWrapper Result object to feed to fetchObject, fetchRow, ...; or false on failure

Reimplemented from DatabaseBase.

Definition at line 35 of file DatabaseMysqlBaseTest.php.

A string describing the current software version, like from mysql_get_server_info().

Returns:
string: Version information from the database server.

Implements DatabaseType.

Definition at line 54 of file DatabaseMysqlBaseTest.php.

Get the inserted value of an auto-increment row.

The value inserted should be fetched from nextSequenceValue()

Example: $id = $dbw->nextSequenceValue( 'page_page_id_seq' ); $dbw->insert( 'page', array( 'page_id' => $id ) ); $id = $dbw->insertId();

Returns:
int

Implements DatabaseType.

Definition at line 51 of file DatabaseMysqlBaseTest.php.

Get the last error number.

See also:
http://www.php.net/mysql_errno
Returns:
int

Implements DatabaseType.

Definition at line 52 of file DatabaseMysqlBaseTest.php.

FakeDatabaseMysqlBase::mysqlConnect ( realServer) [protected]

Open a connection to a MySQL server.

Parameters:
$realServerstring
Returns:
mixed Raw connection
Exceptions:
DBConnectionError

Reimplemented from DatabaseMysqlBase.

Definition at line 38 of file DatabaseMysqlBaseTest.php.

FakeDatabaseMysqlBase::mysqlDataSeek ( res,
row 
) [protected]

Move internal result pointer.

Parameters:
$resRaw result
$rowint
Returns:
bool

Reimplemented from DatabaseMysqlBase.

Definition at line 45 of file DatabaseMysqlBaseTest.php.

FakeDatabaseMysqlBase::mysqlError ( conn = null) [protected]

Returns the text of the error message from previous MySQL operation.

Parameters:
$connRaw connection
Returns:
string

Reimplemented from DatabaseMysqlBase.

Definition at line 46 of file DatabaseMysqlBaseTest.php.

Fetch a result row as an associative and numeric array.

Parameters:
$resRaw result
Returns:
array

Reimplemented from DatabaseMysqlBase.

Definition at line 41 of file DatabaseMysqlBaseTest.php.

FakeDatabaseMysqlBase::mysqlFetchField ( res,
n 
) [protected]

Get column information from a result.

Parameters:
$resRaw result
$nint
Returns:
stdClass

Reimplemented from DatabaseMysqlBase.

Definition at line 47 of file DatabaseMysqlBaseTest.php.

Fetch a result row as an object.

Parameters:
$resRaw result
Returns:
stdClass

Reimplemented from DatabaseMysqlBase.

Definition at line 40 of file DatabaseMysqlBaseTest.php.

FakeDatabaseMysqlBase::mysqlFieldName ( res,
n 
) [protected]

Get the name of the specified field in a result.

Parameters:
$resRaw result
$nint
Returns:
string

Reimplemented from DatabaseMysqlBase.

Definition at line 44 of file DatabaseMysqlBaseTest.php.

Free result memory.

Parameters:
$resRaw result
Returns:
bool

Reimplemented from DatabaseMysqlBase.

Definition at line 39 of file DatabaseMysqlBaseTest.php.

FakeDatabaseMysqlBase::mysqlNumFields ( res) [protected]

Get number of fields in result.

Parameters:
$resRaw result
Returns:
int

Reimplemented from DatabaseMysqlBase.

Definition at line 43 of file DatabaseMysqlBaseTest.php.

FakeDatabaseMysqlBase::mysqlNumRows ( res) [protected]

Get number of rows in result.

Parameters:
$resRaw result
Returns:
int

Reimplemented from DatabaseMysqlBase.

Definition at line 42 of file DatabaseMysqlBaseTest.php.

Ping a server connection or reconnect if there is no connection.

Returns:
bool

Reimplemented from DatabaseMysqlBase.

Definition at line 48 of file DatabaseMysqlBaseTest.php.


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