MediaWiki master
Wikimedia\Rdbms\ExpressionGroup Class Reference

A composite node representing a group of expressions. More...

Inherits Wikimedia\Rdbms\IExpression.

Inherited by Wikimedia\Rdbms\AndExpressionGroup, and Wikimedia\Rdbms\OrExpressionGroup.

Collaboration diagram for Wikimedia\Rdbms\ExpressionGroup:

Public Member Functions

 __construct (IExpression ... $children)
 
 toGeneralizedSql ()
 Return SQL for aggregated logging.
 
 toSql (DbQuoter $dbQuoter)
 

Static Public Member Functions

static newFromArray (array $conds)
 

Protected Member Functions

 add (IExpression $expression)
 
 getType ()
 

Protected Attributes

array IExpression[] $children = []
 

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

A composite node representing a group of expressions.

Since
1.42

Definition at line 16 of file ExpressionGroup.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Rdbms\ExpressionGroup::__construct ( IExpression ... $children)
Parameters
IExpression...$children
Access: internal
Outside of rdbms, Use IReadableDatabase::andExpr() or ::orExpr to create an expression group object

Definition at line 26 of file ExpressionGroup.php.

References Wikimedia\Rdbms\ExpressionGroup\$children.

Member Function Documentation

◆ add()

Wikimedia\Rdbms\ExpressionGroup::add ( IExpression $expression)
finalprotected

Definition at line 30 of file ExpressionGroup.php.

◆ getType()

Wikimedia\Rdbms\ExpressionGroup::getType ( )
abstractprotected

◆ newFromArray()

static Wikimedia\Rdbms\ExpressionGroup::newFromArray ( array $conds)
static
Access: internal
to rdbms
Parameters
non-empty-array<string,?scalar|RawSQLValue|Blob|LikeValue|non-empty-list<scalar|Blob>>|non-empty-array<int,IExpression>$conds
Returns
static

Definition at line 42 of file ExpressionGroup.php.

◆ toGeneralizedSql()

Wikimedia\Rdbms\ExpressionGroup::toGeneralizedSql ( )
final

Return SQL for aggregated logging.

Replaces values with placeholders.

Access: internal

Implements Wikimedia\Rdbms\IExpression.

Definition at line 77 of file ExpressionGroup.php.

◆ toSql()

Wikimedia\Rdbms\ExpressionGroup::toSql ( DbQuoter $dbQuoter)
final
Parameters
DbQuoter$dbQuoter
Returns
string

Implements Wikimedia\Rdbms\IExpression.

Definition at line 69 of file ExpressionGroup.php.

Member Data Documentation

◆ $children

array IExpression [] Wikimedia\Rdbms\ExpressionGroup::$children = []
protected

Definition at line 20 of file ExpressionGroup.php.

Referenced by Wikimedia\Rdbms\ExpressionGroup\__construct().


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