MediaWiki master
Wikimedia\Rdbms\RawSQLExpression Class Reference

Raw SQL value to be used in expression builders. More...

Inherits Wikimedia\Rdbms\Expression.

Collaboration diagram for Wikimedia\Rdbms\RawSQLExpression:

Public Member Functions

 __construct (string $expression)
 This should be used very rarely and NEVER with user input.
 
 toGeneralizedSql ()
 
 toSql (DbQuoter $dbQuoter)
 
- Public Member Functions inherited from Wikimedia\Rdbms\Expression
 __construct (string $field, string $op, $value)
 Store an expression.
 
 and (string $field, string $op, $value)
 
 andExpr (IExpression $expr)
 
 or (string $field, string $op, $value)
 
 orExpr (IExpression $expr)
 

Additional Inherited Members

- Public Attributes inherited from Wikimedia\Rdbms\IExpression
const ACCEPTABLE_OPERATORS = [ '>', '<', '!=', '=', '>=', '<=', self::LIKE, self::NOT_LIKE ]
 
const LIKE = 'LIKE'
 
const NOT_LIKE = 'NOT LIKE'
 

Detailed Description

Raw SQL value to be used in expression builders.

Note
This should be used very rarely and NEVER with user input.
Stability: newable
Since
1.42

Definition at line 15 of file RawSQLExpression.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Rdbms\RawSQLExpression::__construct ( string $expression)

This should be used very rarely and NEVER with user input.

Most common usecases include comparing two columns or function calls (e.g. COUNT(*))

Parameters
string$expressionvalue of the expression
Since
1.42

Definition at line 28 of file RawSQLExpression.php.

Member Function Documentation

◆ toGeneralizedSql()

Wikimedia\Rdbms\RawSQLExpression::toGeneralizedSql ( )
Access: internal
to be used by rdbms library only

Reimplemented from Wikimedia\Rdbms\Expression.

Definition at line 39 of file RawSQLExpression.php.

◆ toSql()

Wikimedia\Rdbms\RawSQLExpression::toSql ( DbQuoter $dbQuoter)
Access: internal
to be used by rdbms library only

Reimplemented from Wikimedia\Rdbms\Expression.

Definition at line 35 of file RawSQLExpression.php.


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