stefano/stefano-lock-table

Build lock table sql query

Installs: 976

Dependents: 1

Suggesters: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

0.0.3 2015-11-09 14:21 UTC

README

Test Status Code Coverage Dependencies
68747470733a2f2f7365637572652e7472617669 Coverage Status Dependency Status

Instalation using Composer

  1. Add following line to composer.json "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();