MediaWiki  master
Wikimedia\Rdbms\QueryBuilderFromRawSql Class Reference

This is to contain any regex on SQL work and get rid of them eventually. More...

Static Public Member Functions

static buildQuery (string $sql, $flags, string $tablePrefix='')
 
static generalizeSQL ( $sql)
 Removes most variables from an SQL query and replaces them with X or N for numbers. More...
 

Detailed Description

This is to contain any regex on SQL work and get rid of them eventually.

This is a radioactive swamp and an extremely flawed and buggy last resort for when the information has not been provided via Query object. Bugs are to be expected in the regexes here.

Access: internal
Since
1.41

Definition at line 35 of file QueryBuilderFromRawSql.php.

Member Function Documentation

◆ buildQuery()

static Wikimedia\Rdbms\QueryBuilderFromRawSql::buildQuery ( string  $sql,
  $flags,
string  $tablePrefix = '' 
)
static

◆ generalizeSQL()

static Wikimedia\Rdbms\QueryBuilderFromRawSql::generalizeSQL (   $sql)
static

Removes most variables from an SQL query and replaces them with X or N for numbers.

It's only slightly flawed. Don't use for anything important.

Parameters
string$sqlA SQL Query
Returns
string

Definition at line 139 of file QueryBuilderFromRawSql.php.

Referenced by Wikimedia\Rdbms\GeneralizedSql\stringify().


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