Skip to content

Easy way to read data page by page #213

@Tigrov

Description

@Tigrov

As an example

$query = (new Query($db))->from('customer');
$dataReader = (new QueryDataReader($query))->withSort(Sort::only(['id']));
$paginator = (new KeysetPaginator($dataReader))->withPageSize(1000);

while ($dataReader = $paginator->nextDataReader()) {
  foreach ($dataReader->read() as $data) {
    // work with $data
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions