MediaWiki master
|
Holds information on Query to be executed. More...
Public Member Functions | |
__construct (string $sql, $flags, $queryVerb, ?string $writeTable=null, $cleanedSql='') | |
getCleanedSql () | |
Get the cleaned/sanitized SQL statement text for logging. | |
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 () | |
Public Attributes | |
const | MULTIWORD_VERBS |
The possible multi-word values for getVerb(). | |
Holds information on Query to be executed.
Wikimedia\Rdbms\Query::__construct | ( | string | $sql, |
$flags, | |||
$queryVerb, | |||
?string | $writeTable = null, | ||
$cleanedSql = '' ) |
string | $sql | SQL statement text |
int | $flags | Bit field of ISQLPlatform::QUERY_CHANGE_* constants |
string | $queryVerb | The first words of the SQL statement that convey what kind of database/table/column/index command was specified. Except for the cases listed in { |
string | null | $writeTable | The table targeted for writes, if any. Can be omitted if it would be hard to identify the table (e.g. when parsing an arbitrary SQL string). |
string | $cleanedSql | Sanitized/simplified SQL statement text for logging. Typically, this means replacing variables / parameter values with placeholders. Can be omitted, in which case the code using the Query is responsible for sanitizing. |
Wikimedia\Rdbms\Query::getCleanedSql | ( | ) |
Get the cleaned/sanitized SQL statement text for logging.
Might return an empty string, which means sanitization is the caller's responsibility.
Definition at line 130 of file Query.php.
Referenced by Wikimedia\Rdbms\GeneralizedSql\newFromQuery().
Wikimedia\Rdbms\Query::getFlags | ( | ) |
Definition at line 113 of file Query.php.
Referenced by Wikimedia\Rdbms\Database\registerTempTables().
Wikimedia\Rdbms\Query::getSQL | ( | ) |
Wikimedia\Rdbms\Query::getVerb | ( | ) |
Wikimedia\Rdbms\Query::getWriteTable | ( | ) |
Get the table which is being written to, or null for a read query or if the destination is unknown.
Definition at line 122 of file Query.php.
Referenced by Wikimedia\Rdbms\Database\doSingleStatementQuery(), and Wikimedia\Rdbms\Database\registerTempTables().
const Wikimedia\Rdbms\Query::MULTIWORD_VERBS |
The possible multi-word values for getVerb().