summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/oci8/oci8_driver.php
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-09-26 01:26:25 +0200
committeradmin <devnull@localhost>2006-09-26 01:26:25 +0200
commit9cd4e8e639a1a09fd6ca426f1af94586f30d4a80 (patch)
tree7abdc9289f336ba520a88e7b92d4a13fa5738287 /system/database/drivers/oci8/oci8_driver.php
parentd125c5c9e9cf3d53e4d6e166e7b44001d02191a3 (diff)
Diffstat (limited to 'system/database/drivers/oci8/oci8_driver.php')
-rw-r--r--system/database/drivers/oci8/oci8_driver.php51
1 files changed, 47 insertions, 4 deletions
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);
@@ -391,6 +402,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
*
* @access private