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>isRepeatable()
public
isRepeatable() : bool
Return values
boolschema()
public
schema() : Schema
Return values
SchemawithKeyAliasSuffix()
public
withKeyAliasSuffix(string $keyAliasSuffix) : self
Parameters
- $keyAliasSuffix : string
Return values
selfwithMaximum()
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
Return values
$thiswithSchema()
Sets the schema for the extracted rows.
public
withSchema(Schema $schema) : $this
Parameters
- $schema : Schema
-
the schema to apply to rows