MediaWiki master
QueryBackend.php
Go to the documentation of this file.
1<?php
2
4
6
14interface QueryBackend {
16 public const DENSITY_LINKS = 'links';
18 public const DENSITY_WATCHLIST = 'watchlist';
20 public const DENSITY_USER = 'user';
22 public const DENSITY_CHANGE_TAG_THRESHOLD = 'change-tag-threshold';
23
25 public const JOIN_ORDER_RECENTCHANGES = 'recentchanges';
27 public const JOIN_ORDER_OTHER = 'other';
28
38 public function joinForFields( string $table ): ChangesListJoinBuilder;
39
49 public function joinForConds( string $table ): ChangesListJoinBuilder;
50
58 public function distinct(): self;
59
69 public function adjustDensity( $density ): self;
70
78 public function joinOrderHint( string $order ): self;
79
86 public function where( IExpression $expr ): self;
87
94 public function fields( $fields ): self;
95
102 public function rcUserFields(): self;
103
110 public function forceEmptySet(): self;
111
117 public function isEmptySet(): bool;
118}
An object encapsulating a single instance of a join on a table.
The narrow interface passed to filter modules.
forceEmptySet()
Set a flag forcing the query to return no rows when it is executed.
const DENSITY_CHANGE_TAG_THRESHOLD
The minimum density to active change tag heuristics.
fields( $fields)
Add fields to the query.
rcUserFields()
Add the rc_user and rc_user_text fields to the query, conventional aliases for actor_user and actor_n...
const DENSITY_WATCHLIST
The naive density of a watchlist query.
const DENSITY_LINKS
The naive density of a RecentChangesLinked query.
const DENSITY_USER
The naive density of a user/actor condition.
where(IExpression $expr)
Add a condition to the query.
const JOIN_ORDER_OTHER
Another table will likely be first in the join.
joinForFields(string $table)
Join on the specified table and declare that it will be used to provide fields for the SELECT clause.
joinForConds(string $table)
Join on the specified table and declare that it will be used to provide fields for the WHERE clause.
distinct()
Flag that the joins will inadvertently duplicate recentchanges rows and that the query will have to d...
const JOIN_ORDER_RECENTCHANGES
The recentchanges table will likely be first in the join.
adjustDensity( $density)
Adjust the density heuristic by multiplying it by the given factor.
joinOrderHint(string $order)
Set the join order hint.
isEmptySet()
Check whether forceEmptySet() has been called.