MediaWiki master
MediaWiki\RecentChanges\ChangesListQuery\QueryBackend Interface Reference

The narrow interface passed to filter modules. More...

Inherited by MediaWiki\RecentChanges\ChangesListQuery\ChangesListQuery.

Public Member Functions

 adjustDensity ( $density)
 Adjust the density heuristic by multiplying it by the given factor.
 
 distinct ()
 Flag that the joins will inadvertently duplicate recentchanges rows and that the query will have to deal with that somehow, maybe by adding a DISTINCT option.
 
 fields ( $fields)
 Add fields to the query.
 
 forceEmptySet ()
 Set a flag forcing the query to return no rows when it is executed.
 
 isEmptySet ()
 Check whether forceEmptySet() has been called.
 
 joinForConds (string $table)
 Join on the specified table and declare that it will be used to provide fields for the WHERE clause.
 
 joinForFields (string $table)
 Join on the specified table and declare that it will be used to provide fields for the SELECT clause.
 
 joinOrderHint (string $order)
 Set the join order hint.
 
 rcUserFields ()
 Add the rc_user and rc_user_text fields to the query, conventional aliases for actor_user and actor_name.
 
 where (IExpression $expr)
 Add a condition to the query.
 

Public Attributes

const DENSITY_CHANGE_TAG_THRESHOLD = 'change-tag-threshold'
 The minimum density to active change tag heuristics.
 
const DENSITY_LINKS = 'links'
 The naive density of a RecentChangesLinked query.
 
const DENSITY_USER = 'user'
 The naive density of a user/actor condition.
 
const DENSITY_WATCHLIST = 'watchlist'
 The naive density of a watchlist query.
 
const JOIN_ORDER_OTHER = 'other'
 Another table will likely be first in the join.
 
const JOIN_ORDER_RECENTCHANGES = 'recentchanges'
 The recentchanges table will likely be first in the join.
 

Detailed Description

The narrow interface passed to filter modules.

Filter condition modules call these methods during query preparation to register their fields, conditions and joins.

Since
1.45

Definition at line 14 of file QueryBackend.php.

Member Function Documentation

◆ adjustDensity()

MediaWiki\RecentChanges\ChangesListQuery\QueryBackend::adjustDensity ( $density)

Adjust the density heuristic by multiplying it by the given factor.

This sets the proportion of recentchanges rows likely to be matched by the conditions.

Parameters
float | int | string$densityEither a number or one of the self::DENSITY_* constants.
Returns
$this

Implemented in MediaWiki\RecentChanges\ChangesListQuery\ChangesListQuery.

Referenced by MediaWiki\RecentChanges\ChangesListQuery\UserCondition\prepareConds(), and MediaWiki\RecentChanges\ChangesListQuery\WatchedCondition\prepareConds().

◆ distinct()

MediaWiki\RecentChanges\ChangesListQuery\QueryBackend::distinct ( )

Flag that the joins will inadvertently duplicate recentchanges rows and that the query will have to deal with that somehow, maybe by adding a DISTINCT option.

Returns
$this

Implemented in MediaWiki\RecentChanges\ChangesListQuery\ChangesListQuery.

Referenced by MediaWiki\RecentChanges\ChangesListQuery\ChangeTagsCondition\prepareConds(), and MediaWiki\RecentChanges\ChangesListQuery\WatchlistLabelCondition\prepareConds().

◆ fields()

◆ forceEmptySet()

◆ isEmptySet()

MediaWiki\RecentChanges\ChangesListQuery\QueryBackend::isEmptySet ( )

Check whether forceEmptySet() has been called.

Returns
bool

Implemented in MediaWiki\RecentChanges\ChangesListQuery\ChangesListQuery.

◆ joinForConds()

◆ joinForFields()

MediaWiki\RecentChanges\ChangesListQuery\QueryBackend::joinForFields ( string $table)

◆ joinOrderHint()

MediaWiki\RecentChanges\ChangesListQuery\QueryBackend::joinOrderHint ( string $order)

Set the join order hint.

Whether recentchanges or some other table will likely be first in the join. If this is JOIN_ORDER_OTHER, partitioning the query by timestamp will be considered.

Parameters
string$order

◆ rcUserFields()

MediaWiki\RecentChanges\ChangesListQuery\QueryBackend::rcUserFields ( )

◆ where()

Member Data Documentation

◆ DENSITY_CHANGE_TAG_THRESHOLD

const MediaWiki\RecentChanges\ChangesListQuery\QueryBackend::DENSITY_CHANGE_TAG_THRESHOLD = 'change-tag-threshold'

The minimum density to active change tag heuristics.

Definition at line 22 of file QueryBackend.php.

◆ DENSITY_LINKS

const MediaWiki\RecentChanges\ChangesListQuery\QueryBackend::DENSITY_LINKS = 'links'

The naive density of a RecentChangesLinked query.

Definition at line 16 of file QueryBackend.php.

◆ DENSITY_USER

const MediaWiki\RecentChanges\ChangesListQuery\QueryBackend::DENSITY_USER = 'user'

The naive density of a user/actor condition.

Definition at line 20 of file QueryBackend.php.

Referenced by MediaWiki\RecentChanges\ChangesListQuery\UserCondition\prepareConds().

◆ DENSITY_WATCHLIST

const MediaWiki\RecentChanges\ChangesListQuery\QueryBackend::DENSITY_WATCHLIST = 'watchlist'

The naive density of a watchlist query.

Definition at line 18 of file QueryBackend.php.

Referenced by MediaWiki\RecentChanges\ChangesListQuery\WatchedCondition\prepareConds().

◆ JOIN_ORDER_OTHER

const MediaWiki\RecentChanges\ChangesListQuery\QueryBackend::JOIN_ORDER_OTHER = 'other'

Another table will likely be first in the join.

Definition at line 27 of file QueryBackend.php.

Referenced by MediaWiki\RecentChanges\ChangesListQuery\WatchedCondition\prepareConds().

◆ JOIN_ORDER_RECENTCHANGES

const MediaWiki\RecentChanges\ChangesListQuery\QueryBackend::JOIN_ORDER_RECENTCHANGES = 'recentchanges'

The recentchanges table will likely be first in the join.

Definition at line 25 of file QueryBackend.php.


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