summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/oci8/oci8_driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/oci8/oci8_driver.php')
-rw-r--r--system/database/drivers/oci8/oci8_driver.php36
1 files changed, 32 insertions, 4 deletions
diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php
index d4adfd528..1cf063ec1 100644
--- a/system/database/drivers/oci8/oci8_driver.php
+++ b/system/database/drivers/oci8/oci8_driver.php
@@ -79,7 +79,7 @@ class CI_DB_oci8_driver extends CI_DB {
*/
function db_connect()
{
- return @ocilogon($this->username, $this->password, $this->hostname);
+ return @ocilogon($this->username, $this->password, $this->hostname, $this->char_set);
}
// --------------------------------------------------------------------
@@ -92,7 +92,7 @@ class CI_DB_oci8_driver extends CI_DB {
*/
function db_pconnect()
{
- return @ociplogon($this->username, $this->password, $this->hostname);
+ return @ociplogon($this->username, $this->password, $this->hostname, $this->char_set);
}
// --------------------------------------------------------------------
@@ -136,7 +136,7 @@ class CI_DB_oci8_driver extends CI_DB {
*/
function db_set_charset($charset, $collation)
{
- // @todo - add support if needed
+ // this is done upon connect
return TRUE;
}
@@ -643,6 +643,34 @@ class CI_DB_oci8_driver extends CI_DB {
// --------------------------------------------------------------------
/**
+ * Insert_batch statement
+ *
+ * Generates a platform-specific insert string from the supplied data
+ *
+ * @access public
+ * @param string the table name
+ * @param array the insert keys
+ * @param array the insert values
+ * @return string
+ */
+ function _insert_batch($table, $keys, $values)
+ {
+ $keys = implode(', ', $keys);
+ $sql = "INSERT ALL\n";
+
+ for ($i = 0, $c = count($values); $i < $c; $i++)
+ {
+ $sql .= ' INTO ' . $table . ' (' . $keys . ') VALUES ' . $values[$i] . "\n";
+ }
+
+ $sql .= 'SELECT * FROM dual';
+
+ return $sql;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Update statement
*
* Generates a platform-specific update string from the supplied data
@@ -776,4 +804,4 @@ class CI_DB_oci8_driver extends CI_DB {
/* End of file oci8_driver.php */
-/* Location: ./system/database/drivers/oci8/oci8_driver.php */ \ No newline at end of file
+/* Location: ./system/database/drivers/oci8/oci8_driver.php */