From ff73401cdef0136c15c6dab95d4d722123668e7a Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Tue, 30 Sep 2008 20:38:12 +0000 Subject: Did a little clean up. Nothing that affected functionality --- system/database/drivers/sqlite/sqlite_driver.php | 20 +------------------- system/database/drivers/sqlite/sqlite_forge.php | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 21 deletions(-) (limited to 'system/database/drivers/sqlite') diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index 46e0fae49..782156949 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -113,7 +113,7 @@ class CI_DB_sqlite_driver extends CI_DB { */ function db_set_charset($charset, $collation) { - // TODO - add support if needed + // @todo - add support if needed return TRUE; } @@ -651,24 +651,6 @@ class CI_DB_sqlite_driver extends CI_DB { @sqlite_close($conn_id); } - // -------------------------------------------------------------------- - - /** - * Rename a table - * - * Generates a platform-specific query so that a table can be renamed - * - * @access private - * @param string the old table name - * @param string the new table name - * @return string - */ - function _rename_table($table_name, $new_table_name) - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table_name)." RENAME TO ".$this->db->_protect_identifiers($new_table_name); - return $sql; - } - } diff --git a/system/database/drivers/sqlite/sqlite_forge.php b/system/database/drivers/sqlite/sqlite_forge.php index 05f366a6f..631c9c771 100644 --- a/system/database/drivers/sqlite/sqlite_forge.php +++ b/system/database/drivers/sqlite/sqlite_forge.php @@ -144,7 +144,7 @@ class CI_DB_sqlite_forge extends CI_DB_forge { $primary_keys = $this->db->_protect_identifiers($primary_keys); $sql .= ",\n\tPRIMARY KEY (" . implode(', ', $primary_keys) . ")"; } - + if (is_array($keys) && count($keys) > 0) { foreach ($keys as $key) @@ -161,7 +161,7 @@ class CI_DB_sqlite_forge extends CI_DB_forge { $sql .= ",\n\tUNIQUE (" . implode(', ', $key) . ")"; } } - + $sql .= "\n)"; return $sql; @@ -241,6 +241,24 @@ class CI_DB_sqlite_forge extends CI_DB_forge { return $sql; } + + // -------------------------------------------------------------------- + + /** + * Rename a table + * + * Generates a platform-specific query so that a table can be renamed + * + * @access private + * @param string the old table name + * @param string the new table name + * @return string + */ + function _rename_table($table_name, $new_table_name) + { + $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table_name)." RENAME TO ".$this->db->_protect_identifiers($new_table_name); + return $sql; + } } /* End of file sqlite_forge.php */ -- cgit v1.2.3-24-g4f1b