- Run command
composer require stefano/stefano-lock-table
- build lock table sql string
- build unlock table sql string
- supported vendors mysql, postgresql
$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();