stefano/stefano-lock-table
Build lock table sql query
0.1.0
2017-09-21 19:14 UTC
Requires
- php: >=7.0.0
Requires (Dev)
- phpunit/phpunit: ^6.0.0
- mockery/mockery: ^0.9.0
- satooshi/php-coveralls: dev-master
README
Test Status | Code Coverage | Dependencies |
---|---|---|
Instalation using Composer
- Run command
composer require stefano/stefano-lock-table
Features
- build lock table sql string
- build unlock table sql string
- supported vendors mysql, postgresql
Usage
$factory = new \StefanoLockTable\Factory();
$vendor = 'Mysql'; //or any supported database
$adapter = $factory->createAdapter($vendor);
//build lock table sql string (exclusive lock)
$adapter->getLockSqlString('tableName');
$adapter->getLockSqlString(array('tableName', 'anotherTable'));
//build unlock table sql string
$adapter->getUnlockSqlString();