summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/postgre
diff options
context:
space:
mode:
authorphilsturgeon <devnull@localhost>2011-06-15 17:00:03 +0200
committerphilsturgeon <devnull@localhost>2011-06-15 17:00:03 +0200
commit0fe54dbaf89a8337d27b9203f74891cf1a799715 (patch)
treece168b3c24788e5a4a31e0cc65b64f54e25ee8a2 /system/database/drivers/postgre
parent3a43c7adae7737d68a0eeca663cc2dd3fc5b0cf3 (diff)
parent3ef65bd7491f847fecdab1acc9687f0e90eee09b (diff)
Merged Alex Bilbies MSSQL changes.
Diffstat (limited to 'system/database/drivers/postgre')
-rw-r--r--system/database/drivers/postgre/postgre_driver.php20
-rw-r--r--system/database/drivers/postgre/postgre_forge.php10
-rw-r--r--system/database/drivers/postgre/postgre_result.php4
-rw-r--r--system/database/drivers/postgre/postgre_utility.php2
4 files changed, 27 insertions, 9 deletions
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index 47ff36246..43d4d4d28 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -554,6 +554,24 @@ class CI_DB_postgre_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)
+ {
+ return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES ".implode(', ', $values);
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Update statement
*
* Generates a platform-specific update string from the supplied data
diff --git a/system/database/drivers/postgre/postgre_forge.php b/system/database/drivers/postgre/postgre_forge.php
index 91a1c6861..fbfaac864 100644
--- a/system/database/drivers/postgre/postgre_forge.php
+++ b/system/database/drivers/postgre/postgre_forge.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -128,14 +128,14 @@ class CI_DB_postgre_forge extends CI_DB_forge {
}
// If this is an auto-incrementing primary key, use the serial data type instead
- if (in_array($field, $primary_keys) && array_key_exists('AUTO_INCREMENT', $attributes)
+ if (in_array($field, $primary_keys) && array_key_exists('AUTO_INCREMENT', $attributes)
&& $attributes['AUTO_INCREMENT'] === TRUE)
{
$sql .= ' SERIAL';
}
else
{
- $sql .= ' '.$attributes['TYPE'];
+ $sql .= ' '.$attributes['TYPE'];
}
// Modified to prevent constraints with integer data types
@@ -213,8 +213,8 @@ class CI_DB_postgre_forge extends CI_DB_forge {
/**
* Drop Table
*
- * @access private
- * @return bool
+ * @access private
+ * @return bool
*/
function _drop_table($table)
{
diff --git a/system/database/drivers/postgre/postgre_result.php b/system/database/drivers/postgre/postgre_result.php
index e9a1d1607..e73a2583a 100644
--- a/system/database/drivers/postgre/postgre_result.php
+++ b/system/database/drivers/postgre/postgre_result.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -120,7 +120,7 @@ class CI_DB_postgre_result extends CI_DB_result {
/**
* Data Seek
*
- * Moves the internal pointer to the desired offset. We call
+ * Moves the internal pointer to the desired offset. We call
* this internally before fetching results to make sure the
* result set starts at zero
*
diff --git a/system/database/drivers/postgre/postgre_utility.php b/system/database/drivers/postgre/postgre_utility.php
index 741c52ea8..c7690fc8f 100644
--- a/system/database/drivers/postgre/postgre_utility.php
+++ b/system/database/drivers/postgre/postgre_utility.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*