You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$expected = "INSERT INTO \"jobs\" (\"description\", \"id\", \"name\") VALUES ('There''s something in your teeth',2,'Commedian'), ('I am yellow',3,'Cab Driver')";
@@ -121,9 +123,6 @@ public function testInsertBatchWithoutEscape()
Copy file name to clipboardExpand all lines: user_guide_src/source/changelogs/v4.1.5.rst
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ BREAKING
14
14
15
15
- Fixed `a bug <https://github.com/codeigniter4/CodeIgniter4/issues/2913>`_ on CSRF protection. Now CSRF protection works on PUT/PATCH/DELETE requests when CSRF filter is applied. If you use such requests, you need to send CSRF token.
16
16
- In the previous version, if you didn't provide your own headers, ``CURLRequest`` would send the request-headers from the browser, due to a bug. As of this version, it does not send them.
17
+
- Fixed ``BaseBuilder::insertBatch()`` return value for ``testMode``. Now it returns SQL string array instead of a number of affected rows. This change was made because of maintaining compatibility between returning types for batch methods. Now the returned data type for ``BaseBuilder::insertBatch()`` is the same as the `updateBatch()` method.
18
+
- Major optimizations have been made to the way data is processed in ``BaseBuilder::insertBatch()`` and ``BaseBuilder::updateBatch()`` methods. This resulted in reduced memory usage and faster query processing. As a trade-off, the result generated by the ``$query->getOriginalQuery()`` method was changed. It no longer returns the query with the binded parameters, but the actual query that was run.
Copy file name to clipboardExpand all lines: user_guide_src/source/installation/upgrade_415.rst
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,14 @@ The bug was fixed. If your requests depend on the headers, your requests might f
61
61
In this case, add the necessary headers manually.
62
62
See `CURLRequest Class <../libraries/curlrequest.html#headers>`_ for how to add.
63
63
64
+
Query Builder changes
65
+
---------------------
66
+
67
+
For optimization and a bug fix, the following behaviors, mostly used in testing, have been changed.
68
+
69
+
- When you use ``insertBatch()`` and ``updateBatch()``, the return value of ``$query->getOriginalQuery()`` has changed. It no longer returns the query with the binded parameters, but the actual query that was run.
70
+
- If ``testMode`` is ``true``, ``insertBatch()`` will return an SQL string array instead of the number of affected rows. This change was made so that the returned data type is the same as the ``updateBatch()`` method.
0 commit comments