MediaWiki master
Wikimedia\Rdbms\JoinGroupBase Class Reference

Shared code between SelectQueryBuilder and JoinGroup to represent tables and join conditions. More...

Inherited by Wikimedia\Rdbms\JoinGroup, and Wikimedia\Rdbms\SelectQueryBuilder.

Public Member Functions

 join ( $table, $alias=null, $conds=[])
 Inner join a table or group of tables.
 
 leftJoin ( $table, $alias=null, $conds=[])
 Left join a table or group of tables.
 
 straightJoin ( $table, $alias=null, $conds=[])
 Straight join a table or group of tables.
 
 table ( $table, $alias=null)
 Add a single table or a single parenthesized group.
 

Protected Member Functions

 getAutoAlias ()
 

Protected Attributes

array $joinConds = []
 
 $lastAlias
 
array $tables = []
 

Detailed Description

Shared code between SelectQueryBuilder and JoinGroup to represent tables and join conditions.

Access: internal

Definition at line 12 of file JoinGroupBase.php.

Member Function Documentation

◆ getAutoAlias()

Wikimedia\Rdbms\JoinGroupBase::getAutoAlias ( )
abstractprotected

◆ join()

Wikimedia\Rdbms\JoinGroupBase::join ( $table,
$alias = null,
$conds = [] )

Inner join a table or group of tables.

This should be called after table().

Parameters
string | JoinGroup | SelectQueryBuilder$tableThe unqualified name of a table, or a JoinGroup containing multiple tables, or a SelectQueryBuilder representing a subquery.
string | null$aliasThe alias name, or null to automatically generate an alias which will be unique to this builder
string | array$condsThe conditions for the ON clause
Returns
$this

Definition at line 86 of file JoinGroupBase.php.

Referenced by MediaWiki\Revision\ArchiveSelectQueryBuilder\joinComment(), MediaWiki\Revision\RevisionSelectQueryBuilder\joinComment(), and MediaWiki\ChangeTags\ChangeTagsStore\modifyDisplayQueryBuilder().

◆ leftJoin()

Wikimedia\Rdbms\JoinGroupBase::leftJoin ( $table,
$alias = null,
$conds = [] )

Left join a table or group of tables.

This should be called after table().

Parameters
string | JoinGroup | SelectQueryBuilder$tableThe unqualified name of a table, or a JoinGroup containing multiple tables, or a SelectQueryBuilder representing a subquery.
string | null$aliasThe alias name, or null to automatically generate an alias which will be unique to this builder
string | array$condsThe conditions for the ON clause
Returns
$this

Definition at line 70 of file JoinGroupBase.php.

Referenced by MediaWiki\ChangeTags\ChangeTagsStore\modifyDisplayQueryBuilder().

◆ straightJoin()

Wikimedia\Rdbms\JoinGroupBase::straightJoin ( $table,
$alias = null,
$conds = [] )

Straight join a table or group of tables.

This should be called after table().

Parameters
string | JoinGroup | SelectQueryBuilder$tableThe unqualified name of a table, or a JoinGroup containing multiple tables, or a SelectQueryBuilder representing a subquery.
string | null$aliasThe alias name, or null to automatically generate an alias which will be unique to this builder
string | array$condsThe conditions for the ON clause
Returns
$this

Definition at line 102 of file JoinGroupBase.php.

◆ table()

Wikimedia\Rdbms\JoinGroupBase::table ( $table,
$alias = null )

Add a single table or a single parenthesized group.

Parameters
string | JoinGroup | SelectQueryBuilder$tableThe table to add. If this is a string, it is the unqualified name of a table. If it is a JoinGroup created by SelectQueryBuilder::newJoinGroup(), the group will be added. If it is a SelectQueryBuilder, a table subquery will be added.
string | null$aliasThe table alias, or null for no alias
Returns
$this

Definition at line 33 of file JoinGroupBase.php.

References Wikimedia\Rdbms\JoinGroupBase\getAutoAlias().

Referenced by MediaWiki\User\UserSelectQueryBuilder\__construct(), MediaWiki\Page\PageSelectQueryBuilder\__construct(), Wikimedia\Rdbms\SelectQueryBuilder\from(), and Wikimedia\Rdbms\SelectQueryBuilder\tables().

Member Data Documentation

◆ $joinConds

array Wikimedia\Rdbms\JoinGroupBase::$joinConds = []
protected

Definition at line 17 of file JoinGroupBase.php.

Referenced by Wikimedia\Rdbms\JoinGroup\getRawJoinConds().

◆ $lastAlias

Wikimedia\Rdbms\JoinGroupBase::$lastAlias
protected

Definition at line 19 of file JoinGroupBase.php.

◆ $tables

array Wikimedia\Rdbms\JoinGroupBase::$tables = []
protected

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