Wikibase
MediaWiki Wikibase extension
Wikibase\Lib\Store\ChunkAccess Interface Reference

Interface for DAO objects providing chunked access based on sequential indexes. More...

+ Inheritance diagram for Wikibase\Lib\Store\ChunkAccess:

Public Member Functions

 loadChunk ( $start, $size)
 Returns a chunk as a list of whatever object is used for data records by the implementing class. More...
 
 getRecordId ( $rec)
 Returns the sequential ID of the given data record. More...
 

Detailed Description

Interface for DAO objects providing chunked access based on sequential indexes.

"holes" in the index sequence are acceptable but should not be frequent.

Author
Daniel Kinzler

Member Function Documentation

◆ getRecordId()

Wikibase\Lib\Store\ChunkAccess::getRecordId (   $rec)

Returns the sequential ID of the given data record.

Parameters
mixed$rec
Returns
int

Implemented in Wikibase\Lib\Store\Sql\EntityChangeLookup, and Wikibase\Lib\Store\ChunkCache.

◆ loadChunk()

Wikibase\Lib\Store\ChunkAccess::loadChunk (   $start,
  $size 
)

Returns a chunk as a list of whatever object is used for data records by the implementing class.

Parameters
int$startThe first ID in the chunk
int$sizeThe desired size of the chunk
Returns
array the desired chunk of rows/objects

Implemented in Wikibase\Lib\Store\Sql\EntityChangeLookup, and Wikibase\Lib\Store\ChunkCache.


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