ideo/transaction

DB transaction library.

1.1 2018-04-12 18:51 UTC

This package is not auto-updated.

Last update: 2024-11-16 09:07:40 UTC


README

Build Status

We will share different transaction implementations for each framework.

When implementing repository patterns for database access, framework specific classes may be exposed in the service layer transaction implementation, but we will prevent that.

The corresponding framework is as follows.

  • PDO
  • Doctrine DBAL
  • Doctrine ORM
  • Laravel
  • Lumen

Usage

// class corresponding to each framework
$tm = new ... 

$tm->beginTransaction();

...

$tm->commit();

Or

// class corresponding to each framework
$tm = new ... 

$tm->transactional(function () {
    ...
});