File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -79,12 +79,20 @@ protected function _truncate(string $table): string
79
79
protected function _updateBatch (string $ table , array $ keys , array $ values ): string
80
80
{
81
81
if (version_compare ($ this ->db ->getVersion (), '3.33.0 ' ) >= 0 ) {
82
- return parent ::_updateBatch ($ table , $ keys , $ values );
82
+ // return parent::_updateBatch($table, $keys, $values);
83
83
}
84
84
85
85
$ constraints = $ this ->QBOptions ['constraints ' ] ?? [];
86
86
87
- if (count ($ constraints ) > 1 || isset ($ this ->QBOptions ['fromQuery ' ])) {
87
+ if ($ constraints === []) {
88
+ if ($ this ->db ->DBDebug ) {
89
+ throw new DatabaseException ('You must specify a constraint to match on for batch updates. ' );
90
+ }
91
+
92
+ return '' ; // @codeCoverageIgnore
93
+ }
94
+
95
+ if (count ($ constraints ) > 1 || isset ($ this ->QBOptions ['fromQuery ' ]) || (current ($ constraints ) instanceof RawSql)) {
88
96
throw new DatabaseException ('You are trying to use a feature which requires SQLite version 3.33 or higher. ' );
89
97
}
90
98
You can’t perform that action at this time.
0 commit comments