diff --git a/src/Db.php b/src/Db.php index c14278c..8986e4c 100644 --- a/src/Db.php +++ b/src/Db.php @@ -103,6 +103,16 @@ class Db { 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 */