1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
5 * An open source application development framework for PHP 4.3.2 or newer
8 * @author ExpressionEngine Dev Team
9 * @copyright Copyright (c) 2008 - 2009, EllisLab, Inc.
10 * @license http://codeigniter.com/user_guide/license.html
11 * @link http://codeigniter.com
16 // ------------------------------------------------------------------------
19 * SQLite Utility Class
22 * @author ExpressionEngine Dev Team
23 * @link http://codeigniter.com/user_guide/database/
25 class CI_DB_sqlite_utility extends CI_DB_utility {
30 * I don't believe you can do a database listing with SQLite
31 * since each database is its own file. I suppose we could
32 * try reading a directory looking for SQLite files, but
33 * that doesn't seem like a terribly good idea
38 function _list_databases()
42 return $this->display_error('db_unsuported_feature');
47 // --------------------------------------------------------------------
50 * Optimize table query
52 * Is optimization even supported in SQLite?
55 * @param string the table name
58 function _optimize_table($table)
63 // --------------------------------------------------------------------
68 * Are table repairs even supported in SQLite?
71 * @param string the table name
74 function _repair_table($table)
79 // --------------------------------------------------------------------
85 * @param array Preferences
88 function _backup($params = array())
90 // Currently unsupported
91 return $this->db->display_error('db_unsuported_feature');
96 * The functions below have been deprecated as of 1.6, and are only here for backwards
97 * compatibility. They now reside in dbforge(). The use of dbutils for database manipulation
98 * is STRONGLY discouraged in favour if using dbforge.
106 * @param string the database name
109 function _create_database()
111 // In SQLite, a database is created when you connect to the database.
112 // We'll return TRUE so that an error isn't generated
116 // --------------------------------------------------------------------
122 * @param string the database name
125 function _drop_database($name)
127 if ( ! @file_exists($this->db->database) OR ! @unlink($this->db->database))
129 if ($this->db->db_debug)
131 return $this->db->display_error('db_unable_to_drop');
140 /* End of file sqlite_utility.php */
141 /* Location: ./system/database/drivers/sqlite/sqlite_utility.php */