Skip to content
Browse files

Merge remote-tracking branch 'develop/develop' into develop

  • Loading branch information...
2 parents fb5e643 + 71ac7e6 commit 4c68793fea682f20fee274eab95cd8f71958180c @dixy committed
Showing with 5 additions and 2 deletions.
  1. +2 −1 application/config/database.php
  2. +2 −1 system/database/DB_active_rec.php
  3. +1 −0 user_guide_src/source/changelog.rst
View
3 application/config/database.php
@@ -43,7 +43,8 @@
| ['password'] The password used to connect to the database
| ['database'] The name of the database you want to connect to
| ['dbdriver'] The database type. e.g.: mysql. Currently supported:
- mysql, mysqli, pdo, postgre, odbc, mssql, sqlite, oci8
+| cubrid, interbase, mssql, mysql, mysqli, oci8,
+| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
| ['dbprefix'] You can add an optional prefix, which will be added
| to the table name when using the Active Record class
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
View
3 system/database/DB_active_rec.php
@@ -1252,11 +1252,12 @@ public function set_insert_batch($key, $value = '', $escape = TRUE)
$key = array($key => $value);
}
- $keys = array_keys(current($key));
+ $keys = array_keys($this->_object_to_array(current($key)));
sort($keys);
foreach ($key as $row)
{
+ $row = $this->_object_to_array($row);
if (count(array_diff($keys, array_keys($row))) > 0 OR count(array_diff(array_keys($row), $keys)) > 0)
{
// batch function above returns an error on an empty array
View
1 user_guide_src/source/changelog.rst
@@ -54,6 +54,7 @@ Release Date: Not Released
- Database
+ - Added the ability to insert objects with insert_batch() in :doc:`Active Record <database/active_record>`.
- Added new :doc:`Active Record <database/active_record>` methods that return
the SQL string of queries without executing them: get_compiled_select(),
get_compiled_insert(), get_compiled_update(), get_compiled_delete().

0 comments on commit 4c68793

Please sign in to comment.
Something went wrong with that request. Please try again.