MediaWiki master
MediaWiki\RecentChanges\ChangesListQuery\ChangesListJoinBuilder Class Reference

An object encapsulating a single instance of a join on a table. More...

Public Member Functions

 __construct (string $tableName, ?string $alias, array $conds)
 
 forConds ()
 Declare that the join is required to provide fields for the WHERE clause.
 
 forFields ()
 Declare that the join is required to provide fields in the SELECT clause.
 
 left ()
 Require a left join.
 
 on (IExpression $expr)
 Add a condition to the join conditions.
 
 prepare (SelectQueryBuilder $sqb)
 Implement the join on a SelectQueryBuilder.
 
 reorderable ()
 Request a reorderable join.
 
 straight ()
 Request a straight join.
 
 toString (DbQuoter $dbQuoter)
 
 weakLeft ()
 Request a left join.
 

Detailed Description

An object encapsulating a single instance of a join on a table.

Since
1.45

Definition at line 15 of file ChangesListJoinBuilder.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\RecentChanges\ChangesListQuery\ChangesListJoinBuilder::__construct ( string $tableName,
?string $alias,
array $conds )

Definition at line 32 of file ChangesListJoinBuilder.php.

Member Function Documentation

◆ forConds()

MediaWiki\RecentChanges\ChangesListQuery\ChangesListJoinBuilder::forConds ( )

Declare that the join is required to provide fields for the WHERE clause.

Returns
$this

Definition at line 51 of file ChangesListJoinBuilder.php.

◆ forFields()

MediaWiki\RecentChanges\ChangesListQuery\ChangesListJoinBuilder::forFields ( )

Declare that the join is required to provide fields in the SELECT clause.

Returns
$this

Definition at line 42 of file ChangesListJoinBuilder.php.

◆ left()

MediaWiki\RecentChanges\ChangesListQuery\ChangesListJoinBuilder::left ( )

Require a left join.

This is a strong join type – subsequent requests to change the join type will throw. This is appropriate when the conditions logically require a left join.

Returns
$this

Definition at line 91 of file ChangesListJoinBuilder.php.

◆ on()

MediaWiki\RecentChanges\ChangesListQuery\ChangesListJoinBuilder::on ( IExpression $expr)

Add a condition to the join conditions.

Parameters
IExpression$expr
Returns
$this

Definition at line 114 of file ChangesListJoinBuilder.php.

◆ prepare()

MediaWiki\RecentChanges\ChangesListQuery\ChangesListJoinBuilder::prepare ( SelectQueryBuilder $sqb)

Implement the join on a SelectQueryBuilder.

Parameters
SelectQueryBuilder$sqb

Definition at line 160 of file ChangesListJoinBuilder.php.

References Wikimedia\Rdbms\JoinGroupBase\join(), Wikimedia\Rdbms\JoinGroupBase\leftJoin(), and Wikimedia\Rdbms\JoinGroupBase\straightJoin().

◆ reorderable()

MediaWiki\RecentChanges\ChangesListQuery\ChangesListJoinBuilder::reorderable ( )

Request a reorderable join.

This allows the DBMS to place the table first if it desired. This is appropriate when the conditions will match only a few rows in the recentchanges table.

This is a strong join type – subsequent requests for a weak join type will be ignored.

Returns
$this

Definition at line 80 of file ChangesListJoinBuilder.php.

◆ straight()

MediaWiki\RecentChanges\ChangesListQuery\ChangesListJoinBuilder::straight ( )

Request a straight join.

This is a hint to the MariaDB optimiser that this table should not be done first. It's appropriate to use it when the conditions will match most rows in the recentchanges table.

This is a weak join type – a subsequent call to reorderable() will override it.

Returns
$this

Definition at line 66 of file ChangesListJoinBuilder.php.

◆ toString()

MediaWiki\RecentChanges\ChangesListQuery\ChangesListJoinBuilder::toString ( DbQuoter $dbQuoter)
Access: internal
Testing/debugging helper
Parameters
DbQuoter$dbQuoter
Returns
string

Definition at line 189 of file ChangesListJoinBuilder.php.

References Wikimedia\Rdbms\IExpression\toSql().

◆ weakLeft()

MediaWiki\RecentChanges\ChangesListQuery\ChangesListJoinBuilder::weakLeft ( )

Request a left join.

This is a weak join type – subsequent requests to change to a straight or reorderable join will be allowed. This is appropriate when doing a left join for fields. A subsequent filter may upgrade the join type in order to place strict conditions on the same fields.

Returns
$this

Definition at line 104 of file ChangesListJoinBuilder.php.


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