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