MediaWiki master
Wikimedia\Rdbms\Query Class Reference

Holds information on Query to be executed. More...

Public Member Functions

 __construct (string $sql, $flags, $queryVerb, string $writeTable=null, $cleanedSql='')
 
 getCleanedSql ()
 
 getFlags ()
 
 getSQL ()
 
 getVerb ()
 
 getWriteTable ()
 Get the table which is being written to, or null for a read query or if the destination is unknown.
 
 isWriteQuery ()
 

Detailed Description

Holds information on Query to be executed.

Access: internal
Since
1.41

Definition at line 31 of file Query.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Rdbms\Query::__construct ( string  $sql,
  $flags,
  $queryVerb,
string  $writeTable = null,
  $cleanedSql = '' 
)
Parameters
string$sqlSQL statement text
int$flagsBit field of ISQLPlatform::QUERY_CHANGE_* constants
string$queryVerbThe first words of the SQL statement that convey what kind of database/table/column/index command was specified. Except for the following cases, this will be the first word of the SQL statement:
  • "RELEASE SAVEPOINT"
  • "ROLLBACK TO SAVEPOINT"
  • "CREATE TEMPORARY"
  • "CREATE INDEX"
  • "DROP INDEX"
  • "CREATE DATABASE"
  • "ALTER DATABASE"
  • "DROP DATABASE"
string | null$writeTableThe table targeted for writes, if any
string$cleanedSqlSanitized/simplified SQL statement text for logging

Definition at line 55 of file Query.php.

Member Function Documentation

◆ getCleanedSql()

Wikimedia\Rdbms\Query::getCleanedSql ( )

Definition at line 119 of file Query.php.

◆ getFlags()

Wikimedia\Rdbms\Query::getFlags ( )
Returns
int

Definition at line 104 of file Query.php.

Referenced by Wikimedia\Rdbms\Database\registerTempTables().

◆ getSQL()

◆ getVerb()

◆ getWriteTable()

Wikimedia\Rdbms\Query::getWriteTable ( )

Get the table which is being written to, or null for a read query or if the destination is unknown.

Returns
string|null

Definition at line 115 of file Query.php.

Referenced by Wikimedia\Rdbms\Database\doSingleStatementQuery(), and Wikimedia\Rdbms\Database\registerTempTables().

◆ isWriteQuery()

Wikimedia\Rdbms\Query::isWriteQuery ( )

Definition at line 69 of file Query.php.

References Wikimedia\Rdbms\QueryBuilderFromRawSql\buildQuery().


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