MediaWiki master
MediaWiki\RecentChanges\ChangesListQuery\TableStatsProvider Class Reference

Cache and provide min/max ID and "size" (ID delta) of a table. More...

Public Member Functions

 __construct (private IConnectionProvider $connectionProvider, private string $tableName, private string $idField,)
 
 getIdDelta ()
 Estimate the number of rows in the table, using the difference of maximum and minimum primary keys.
 
 getMaxId ()
 Get the maximum ID.
 
 getMinId ()
 Get the minimum ID.
 

Detailed Description

Cache and provide min/max ID and "size" (ID delta) of a table.

Access: internal
For use by ChangesListQuery
Since
1.45

Definition at line 14 of file TableStatsProvider.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\RecentChanges\ChangesListQuery\TableStatsProvider::__construct ( private IConnectionProvider $connectionProvider,
private string $tableName,
private string $idField )

Definition at line 19 of file TableStatsProvider.php.

Member Function Documentation

◆ getIdDelta()

MediaWiki\RecentChanges\ChangesListQuery\TableStatsProvider::getIdDelta ( )

Estimate the number of rows in the table, using the difference of maximum and minimum primary keys.

Returns
int

Definition at line 32 of file TableStatsProvider.php.

◆ getMaxId()

MediaWiki\RecentChanges\ChangesListQuery\TableStatsProvider::getMaxId ( )

Get the maximum ID.

Returns
int|null

Definition at line 52 of file TableStatsProvider.php.

◆ getMinId()

MediaWiki\RecentChanges\ChangesListQuery\TableStatsProvider::getMinId ( )

Get the minimum ID.

Returns
int|null

Definition at line 42 of file TableStatsProvider.php.


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