3 use Wikimedia\Rdbms\ResultWrapper
;
6 * Extension mechanism for WatchedItemQueryService
13 * @license GNU GPL v2+
15 interface WatchedItemQueryServiceExtension
{
18 * Modify the WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo()
19 * query before it's made.
21 * @warning Any joins added *must* join on a unique key of the target table
22 * unless you really know what you're doing.
24 * @param array $options Options from
25 * WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo()
26 * @param IDatabase $db Database connection being used for the query
27 * @param array &$tables Tables for Database::select()
28 * @param array &$fields Fields for Database::select()
29 * @param array &$conds Conditions for Database::select()
30 * @param array &$dbOptions Options for Database::select()
31 * @param array &$joinConds Join conditions for Database::select()
33 public function modifyWatchedItemsWithRCInfoQuery( User
$user, array $options, IDatabase
$db,
34 array &$tables, array &$fields, array &$conds, array &$dbOptions, array &$joinConds
38 * Modify the results from WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo()
39 * before they're returned.
42 * @param array $options Options from
43 * WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo()
44 * @param IDatabase $db Database connection being used for the query
45 * @param array &$items array of pairs ( WatchedItem $watchedItem, string[] $recentChangeInfo ).
46 * May be truncated if necessary, in which case $startFrom must be updated.
47 * @param ResultWrapper|bool $res Database query result
48 * @param array|null &$startFrom Continuation value. If you truncate $items, set this to
49 * [ $recentChangeInfo['rc_timestamp'], $recentChangeInfo['rc_id'] ] from the first item
52 public function modifyWatchedItemsWithRCInfo( User
$user, array $options, IDatabase
$db,
53 array &$items, $res, &$startFrom