diff options
Diffstat (limited to 'lib/Minz/PdoSqlite.php')
| -rw-r--r-- | lib/Minz/PdoSqlite.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/Minz/PdoSqlite.php b/lib/Minz/PdoSqlite.php new file mode 100644 index 000000000..c577ad887 --- /dev/null +++ b/lib/Minz/PdoSqlite.php @@ -0,0 +1,21 @@ +<?php + +/** + * MINZ - Copyright 2011 Marien Fressinaud + * Sous licence AGPL3 <http://www.gnu.org/licenses/> + */ + +class Minz_PdoSqlite extends Minz_Pdo { + public function __construct($dsn, $username = null, $passwd = null, $options = null) { + parent::__construct($dsn, $username, $passwd, $options); + $this->exec('PRAGMA foreign_keys = ON;'); + } + + public function dbType() { + return 'sqlite'; + } + + public function lastInsertId($name = null) { + return parent::lastInsertId(); //We discard the name, only used by PostgreSQL + } +} |
