Flow PHP

DbalKeySetExtractor implements BatchableExtractor, Extractor, LimitPushDown, RewindableExtractor uses Batches, PushesLimit

FinalYes

Extractor implementing keyset pagination for Doctrine DBAL queries.

This extractor fetches rows page by page using keyset pagination, which is more efficient than limit/offset for large datasets. It requires a KeySet object defining the columns and sort orders for pagination. The key columns must be non-null and provide a unique ordering to ensure correct pagination.

Interfaces

BatchableExtractor
Extractor
LimitPushDown
RewindableExtractor

Methods

__construct()  : mixed
extract()  : Generator<Signal|null, void>
isRepeatable()  : bool
schema()  : Schema
withKeyAliasSuffix()  : self
withMaximum()  : $this
Sets the maximum number of rows to fetch.
withSchema()  : $this
Sets the schema for the extracted rows.

Methods

__construct()

public __construct(Connection $connection, QueryBuilder $queryBuilder, KeySet $keySet) : mixed
Parameters
$connection : Connection
$queryBuilder : QueryBuilder
$keySet : KeySet

extract()

public extract(FlowContext $context) : Generator<Signal|null, void>
Parameters
$context : FlowContext
Return values
Generator<Signal|null, void>

withKeyAliasSuffix()

public withKeyAliasSuffix(string $keyAliasSuffix) : self
Parameters
$keyAliasSuffix : string
Return values
self

withMaximum()

Sets the maximum number of rows to fetch.

public withMaximum(int $maximum) : $this
Parameters
$maximum : int

the maximum number of rows (must be > 0)

Tags
throws
InvalidArgumentException

if maximum is <= 0

Return values
$this

withSchema()

Sets the schema for the extracted rows.

public withSchema(Schema $schema) : $this
Parameters
$schema : Schema

the schema to apply to rows

Return values
$this
On this page

Search results