From 9cd4e8e639a1a09fd6ca426f1af94586f30d4a80 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 25 Sep 2006 23:26:25 +0000 Subject: --- system/database/drivers/oci8/oci8_driver.php | 51 +++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 4 deletions(-) (limited to 'system/database/drivers/oci8/oci8_driver.php') diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index f7f4bd143..bc0a100c2 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -91,6 +91,19 @@ class CI_DB_oci8_driver extends CI_DB { return TRUE; } + // -------------------------------------------------------------------- + + /** + * Version number query string + * + * @access public + * @return string + */ + function _version() + { + return ociserverversion($this->conn_id); + } + // -------------------------------------------------------------------- /** @@ -102,10 +115,8 @@ class CI_DB_oci8_driver extends CI_DB { */ function _execute($sql) { - // oracle must parse the query before it - // is run, all of the actions with - // the query are based off the statement id - // returned by ociparse + // oracle must parse the query before it is run. All of the actions with + // the query are based on the statement id returned by ociparse $this->_set_stmt_id($sql); ocisetprefetch($this->stmt_id, 1000); return @ociexecute($this->stmt_id, $this->_commit); @@ -390,6 +401,38 @@ class CI_DB_oci8_driver extends CI_DB { // -------------------------------------------------------------------- + /** + * Show columnn query + * + * Generates a platform-specific query string so that the column names can be fetched + * + * @access public + * @param string the table name + * @return string + */ + function _list_columns($table = '') + { + return "SELECT COLUMN_NAME FROM all_tab_columns WHERE table_name = '$table'"; + } + + // -------------------------------------------------------------------- + + /** + * Field data query + * + * Generates a platform-specific query so that the column data can be retrieved + * + * @access public + * @param string the table name + * @return object + */ + function _field_data($table) + { + return "SELECT * FROM ".$this->_escape_table($table)." where rownum = 1"; + } + + // -------------------------------------------------------------------- + /** * The error message string * -- cgit v1.2.3-24-g4f1b