summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/sqlite
diff options
context:
space:
mode:
authorRick Ellis <rick.ellis@ellislab.com>2008-09-30 22:38:12 +0200
committerRick Ellis <rick.ellis@ellislab.com>2008-09-30 22:38:12 +0200
commitff73401cdef0136c15c6dab95d4d722123668e7a (patch)
treea9d04ceca35fb777cdd769a1b093821d195de230 /system/database/drivers/sqlite
parent8f99224e6c6d3ac51cb0f356e2e0feb10fa93f31 (diff)
Did a little clean up. Nothing that affected functionality
Diffstat (limited to 'system/database/drivers/sqlite')
-rw-r--r--system/database/drivers/sqlite/sqlite_driver.php20
-rw-r--r--system/database/drivers/sqlite/sqlite_forge.php22
2 files changed, 21 insertions, 21 deletions
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 */