2017 © Pedro Peláez
 

library bulk-fetcher

image

adt/bulk-fetcher

  • Monday, May 7, 2018
  • by michallohnisky
  • Repository
  • 6 Watchers
  • 0 Stars
  • 244 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 28 % Grown

The README.md

BulkFetcher

\ADT\BulkFetcher\Factory can be used with:, (*1)

  • \Kdyby\Doctrine\ResultSet
  • \Doctrine\ORM\QueryBuilder
  • \Kdyby\Doctrine\NativeQueryBuilder

Installation

via composer:, (*2)

composer require adt/bulk-fetcher

Full example

Whole batch is in transaction., (*3)


$qb = $entityManager->createQueryBuilder('user'); try { $entityManager->beginTransaction(); $data = \ADT\BulkFetcher\Factory::create($qb, 100); $data->onBeforeFetch[] = function() use ($entityManager) { $entityManager->commit(); $entityManager->clear(); $entityManager->beginTransaction(); }; foreach ($data as $key => $row) { // code } $entityManager->commit(); } catch (\Exception $e) { $entityManager->rollback(); throw $e; }

The Versions

07/05 2018

dev-master

9999999-dev

  Sources   Download

MIT GPL-3.0 BSD-3-Clause GPL-2.0

The Development Requires

07/05 2018

v2.0

2.0.0.0

  Sources   Download

MIT GPL-3.0 BSD-3-Clause GPL-2.0

The Development Requires

17/04 2018

v1.1.0

1.1.0.0

  Sources   Download

MIT GPL-3.0 BSD-3-Clause GPL-2.0

The Development Requires

16/03 2017

v1.0.0

1.0.0.0

  Sources   Download

MIT GPL-3.0 BSD-3-Clause GPL-2.0

The Development Requires