Db: add set_autocommit() method
This commit is contained in:
parent
83f1445799
commit
77deb947db
1 changed files with 10 additions and 0 deletions
10
src/Db.php
10
src/Db.php
|
@ -103,6 +103,16 @@ class Db {
|
||||||
Log :: debug($msg);
|
Log :: debug($msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set autocommit (only available on OCI, Firebird or MySQL connection)
|
||||||
|
* @param bool $value
|
||||||
|
* @see https://www.php.net/manual/en/pdo.setattribute.php
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function set_autocommit($value) {
|
||||||
|
$this -> pdo -> setAttribute(PDO::ATTR_AUTOCOMMIT, $value);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Handle date/datetime format
|
* Handle date/datetime format
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue