https://github.com/bartko-s/stefano-lock-table
https://github.com/bartko-s/stefano-lock-table
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bartko-s/stefano-lock-table
- Owner: bartko-s
- Created: 2014-01-23T15:32:34.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2022-09-30T18:56:20.000Z (almost 4 years ago)
- Last Synced: 2025-08-04T22:04:49.250Z (12 months ago)
- Language: PHP
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Stefano Lock Table
===================
[](https://app.travis-ci.com/bartko-s/stefano-lock-table)
[](https://coveralls.io/r/bartko-s/stefano-lock-table?branch=master)
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();
```