stefano/stefano-lock-table

0.1.0 2017-09-21 19:14 UTC

README

Test Status Code Coverage Dependencies
68747470733a2f2f7365637572652e7472617669732d63692e6f72672f626172746b6f2d732f73746566616e6f2d6c6f636b2d7461626c652e706e673f6272616e63683d6d6173746572 Coverage Status Dependency Status

Instalation using Composer

  1. 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();