diff options
author | Greg Aker <greg.aker@ellislab.com> | 2011-04-27 08:45:38 +0200 |
---|---|---|
committer | Greg Aker <greg.aker@ellislab.com> | 2011-04-27 08:45:38 +0200 |
commit | 60ef4ea72e169e174ff8dbb421609a178a3c0c48 (patch) | |
tree | c671c840b20193e06044a348783e78be2570932a | |
parent | 1d3021a26e3d542137ceddc6c0f4a08a4f80a096 (diff) |
Added insert_batch() function to the PostgreSQL database driver. Thanks to epallerols for the patch.
-rw-r--r-- | system/database/drivers/postgre/postgre_driver.php | 18 | ||||
-rw-r--r-- | user_guide/changelog.html | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 47ff36246..140396885 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -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/user_guide/changelog.html b/user_guide/changelog.html index 76f9e5dd9..206322e11 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -73,6 +73,7 @@ Change Log <li>Added Session Class userdata to the output profiler. Additionally, added a show/hide toggle on HTTP Headers, Session Data and Config Variables.</li> <li>Removed internal usage of the <samp>EXT</samp> constant.</li> <li>Visual updates to the welcome_message view file and default error templates. Thanks to <a href="https://bitbucket.org/danijelb">danijelb</a> for the pull request.</li> + <li>Added <samp>insert_batch()</samp> function to the PostgreSQL database driver. Thanks to epallerols for the patch.</li> </ul> </li> <li>Helpers |