PdoSqlite.php 529 B

123456789101112131415161718192021
  1. <?php
  2. /**
  3. * MINZ - Copyright 2011 Marien Fressinaud
  4. * Sous licence AGPL3 <http://www.gnu.org/licenses/>
  5. */
  6. class Minz_PdoSqlite extends Minz_Pdo {
  7. public function __construct($dsn, $username = null, $passwd = null, $options = null) {
  8. parent::__construct($dsn, $username, $passwd, $options);
  9. $this->exec('PRAGMA foreign_keys = ON;');
  10. }
  11. public function dbType() {
  12. return 'sqlite';
  13. }
  14. public function lastInsertId($name = null) {
  15. return parent::lastInsertId(); //We discard the name, only used by PostgreSQL
  16. }
  17. }