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
$db->table('test')->testMode()->setUpdateBatch($set)->updateBatch($data, 'value', 1);
$db->table('test')->testMode()->setUpdateBatch($set)->updateBatch(null, 'value', 1);
//throws// CodeIgniter\Database\Exceptions\DatabaseException : One or more rows submitted for batch updating is missing the specified index.// CodeIgniter4\system\Database\BaseBuilder.php:2121
works only
$db->table('test')->testMode()->updateBatch($data, 'value', 1);
Activity
kenjis commentedon Feb 10, 2022
What about updateBatch()?
kenjis commentedon Feb 10, 2022
Personally, I think it's enough if the following works:
iRedds commentedon Feb 10, 2022
works only
$db->table('test')->testMode()->updateBatch($data, 'value', 1);
iRedds commentedon Feb 10, 2022
Situations can be different, so I think any valid behavior needs to be handled.
After all, setInsertBatch() was added for something.
iRedds commentedon Feb 10, 2022
I think in insertBatch() one can wrap $set in setInsertBatch();
string $value = ''in setInsertBatch() ??? for what?[-]Bug: setInsertBatch() + insertBatch()[/-][+]Bug: [QueryBuilder] setInsertBatch() + insertBatch()[/+]sclubricants commentedon Jul 29, 2022
I have a fix for this.
I could add to #6294 or wait and submit a separate PR
kenjis commentedon Jul 29, 2022
Why do you guys need to use both
setInsertBatch()andinsertBatch()with data set at a time?What's the benefit?
I think the following API is better:
Please never add anything to it. It is already too big
+1,165 −24.sclubricants commentedon Jul 30, 2022
It wasn't so many lines when my lines were kilometers long 😜
Looking at this gives me some good ideas of refactoring some things. I'll wait though on that.
kenjis commentedon Sep 27, 2022
Closed by #6536