Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
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.
 
 getRecordId ( $rec)
 Returns the sequential ID of the given data record.
 

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\ChunkCache, and Wikibase\Lib\Store\Sql\EntityChangeLookup.

◆ 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\ChunkCache, and Wikibase\Lib\Store\Sql\EntityChangeLookup.


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