Download the PHP package minetro/ntdb without Composer
On this page you can find all versions of the php package minetro/ntdb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package ntdb
Short Description Nette Database Nested Transaction
License BSD-3-Clause
Homepage https://github.com/minetro/ntdb
Informations about the package ntdb
Website 🚀 contributte.org | Contact 👨🏻💻 f3l1x.io | Twitter 🐦 @contributte
Disclaimer
:warning: | This project is no longer being maintained. Please use contributte/database. |
---|
Composer | minetro/ntdb |
---|---|
Version | |
PHP | |
License |
Resources
Inspired by these articles:
- http://www.yiiframework.com/wiki/38/how-to-use-nested-db-transactions-mysql-5-postgresql/
- http://www.kennynet.co.uk/2008/12/02/php-pdo-nested-transactions/
- https://gist.github.com/neoascetic/5269127
Usage
Provide nested transaction via savepoints.
Support
- MySQL / MySQLi
- PostgreSQL
- SQLite
API
$t->begin
$t->commit
$t->rollback
$t->transaction
or$t->t
$t->promise
Begin
Starts transaction.
Commit
Commit changes in transaction.
Rollback
Revert changes in transaction.
Transaction
Combine begin, commit and rollback to one method.
On success it commits changes, if exceptions is thrown it rollbacks changes.
Promise
Another attitude to transaction.
UnresolvedTransactionException
Log unresolved transaction.
Idea by Ondrej Mirtes (https://ondrej.mirtes.cz/detekce-neuzavrenych-transakci).
Nette
EXTENSION
That's all. You can let nette\di autowired it to your services/presenters.
NEON
Register as service in your config file.
On multiple connections you have to specific one.
Repository | Presenter
Development
This package was maintain by these authors.
Consider to support contributte development team. Also thank you for being used this package.