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