From 39b622db9bda38282a32bb45623da63efe685729 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Wed, 16 Jan 2008 21:10:09 +0000 Subject: Many new Active Record functions, and another whack of stuff --- system/database/drivers/sqlite/sqlite_utility.php | 103 +++++++++------------- 1 file changed, 44 insertions(+), 59 deletions(-) (limited to 'system/database/drivers/sqlite/sqlite_utility.php') diff --git a/system/database/drivers/sqlite/sqlite_utility.php b/system/database/drivers/sqlite/sqlite_utility.php index 85e74d05f..1c78c54b7 100644 --- a/system/database/drivers/sqlite/sqlite_utility.php +++ b/system/database/drivers/sqlite/sqlite_utility.php @@ -24,45 +24,6 @@ */ class CI_DB_sqlite_utility extends CI_DB_utility { - - /** - * Create database - * - * @access public - * @param string the database name - * @return bool - */ - function _create_database() - { - // In SQLite, a database is created when you connect to the database. - // We'll return TRUE so that an error isn't generated - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Drop database - * - * @access private - * @param string the database name - * @return bool - */ - function _drop_database($name) - { - if ( ! @file_exists($this->db->database) OR ! @unlink($this->db->database)) - { - if ($this->db->db_debug) - { - return $this->db->display_error('db_unable_to_drop'); - } - return FALSE; - } - return TRUE; - } - - // -------------------------------------------------------------------- - /** * List databases * @@ -85,25 +46,6 @@ class CI_DB_sqlite_utility extends CI_DB_utility { // -------------------------------------------------------------------- - /** - * Drop Table - * - * Unsupported feature in SQLite - * - * @access private - * @return bool - */ - function _drop_table($table) - { - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return array(); - } - - // -------------------------------------------------------------------- - /** * Optimize table query * @@ -149,6 +91,49 @@ class CI_DB_sqlite_utility extends CI_DB_utility { return $this->db->display_error('db_unsuported_feature'); } -} + /** + * + * The functions below have been deprecated as of 1.6, and are only here for backwards + * compatibility. They now reside in dbforge(). The use of dbutils for database manipulation + * is STRONGLY discouraged in favour if using dbforge. + * + */ + + /** + * Create database + * + * @access public + * @param string the database name + * @return bool + */ + function _create_database() + { + // In SQLite, a database is created when you connect to the database. + // We'll return TRUE so that an error isn't generated + return TRUE; + } + // -------------------------------------------------------------------- + + /** + * Drop database + * + * @access private + * @param string the database name + * @return bool + */ + function _drop_database($name) + { + if ( ! @file_exists($this->db->database) OR ! @unlink($this->db->database)) + { + if ($this->db->db_debug) + { + return $this->db->display_error('db_unable_to_drop'); + } + return FALSE; + } + return TRUE; + } + +} ?> \ No newline at end of file -- cgit v1.2.3-24-g4f1b