elektro-potkan/neplus-database

NePlus Database - Custom modifications on top of Nette Database

v0.2.0 2021-10-06 23:11 UTC

This package is auto-updated.

Last update: 2024-06-07 03:08:04 UTC


README

Custom modifications on top of Nette Database.

Usage

// constructor is the same as of Nette\Database\Connection
$db = ElektroPotkan\NePlus\Database\ConnectionMySQL(
	'mysql:host=localhost;dbname=mydb',
	'user',
	'password'
);

// query LOCK TABLES `myTable1` READ, `myTable2` WRITE
$db->lockTables([
	'myTable1' => false,
	'myTable2' => true,
]);

// query UNLOCK TABLES
$db->unlockTables();

Nette DI

To switch all database connections registered in DI Container from Nette\Database\Connection to ElektroPotkan\NePlus\Database\ConnectionMySQL, just use the bundled DI extension:

extensions:
	- ElektroPotkan\NePlus\Bridges\Database\DI\DatabaseExtension

Author

Elektro-potkan git@elektro-potkan.cz

Info

Versioning

This project uses Semantic Versioning 2.0.0 (semver.org).

Branching

This project uses slightly modified Git-Flow Workflow and Branching Model:

License

You may use this program under the terms of either the BSD Zero Clause License or the GNU General Public License (GPL) version 3 or later.

See file LICENSE.