diff options
Diffstat (limited to 'system/database/drivers/sqlite')
-rw-r--r-- | system/database/drivers/sqlite/sqlite_result.php | 23 | ||||
-rw-r--r-- | system/database/drivers/sqlite/sqlite_utility.php | 31 |
2 files changed, 53 insertions, 1 deletions
diff --git a/system/database/drivers/sqlite/sqlite_result.php b/system/database/drivers/sqlite/sqlite_result.php index f30a8cfdf..7f48ce8aa 100644 --- a/system/database/drivers/sqlite/sqlite_result.php +++ b/system/database/drivers/sqlite/sqlite_result.php @@ -49,7 +49,28 @@ class CI_DB_sqlite_result extends CI_DB_result { { return @sqlite_num_fields($this->result_id); } - + + // -------------------------------------------------------------------- + + /** + * Fetch Field Names + * + * Generates an array of column names + * + * @access public + * @return array + */ + function field_names() + { + $field_names = array(); + for ($i = 0; $i < $this->num_fields(); $i++) + { + $Ffield_names[] = sqlite_field_name($this->result_id, $i); + } + + return $field_names; + } + // -------------------------------------------------------------------- /** diff --git a/system/database/drivers/sqlite/sqlite_utility.php b/system/database/drivers/sqlite/sqlite_utility.php index 754a755e4..e9f4eb64e 100644 --- a/system/database/drivers/sqlite/sqlite_utility.php +++ b/system/database/drivers/sqlite/sqlite_utility.php @@ -155,6 +155,37 @@ class CI_DB_sqlite_utility extends CI_DB_utility { return "SELECT * FROM ".$this->db->_escape_table($table)." LIMIT 1"; } + // -------------------------------------------------------------------- + + /** + * Optimize table query + * + * Generates a platform-specific query so that a table can be optimized + * + * @access private + * @param string the table name + * @return object + */ + function _optimize_table($table) + { + return FALSE; // Is this supported SQLite? + } + + // -------------------------------------------------------------------- + + /** + * Repair table query + * + * Generates a platform-specific query so that a table can be repaired + * + * @access private + * @param string the table name + * @return object + */ + function _repair_table($table) + { + return return FALSE; // Is this supported in SQLite? + } } |