create-prisma-php-app 1.7.9 → 1.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -171,22 +171,17 @@ abstract class Utility
|
|
|
171
171
|
if ($key === 'NOT') {
|
|
172
172
|
self::processNotCondition($value, $groupedConditions, $bindings, $dbType, $prefix . $key . '_', $level);
|
|
173
173
|
} else {
|
|
174
|
-
foreach ($value as $
|
|
175
|
-
if (
|
|
176
|
-
|
|
177
|
-
throw new \Exception("The '$key' condition must be an indexed array.");
|
|
178
|
-
}
|
|
179
|
-
foreach ($subCondition as $subKey => $subValue) {
|
|
180
|
-
self::processSingleCondition($subKey, $subValue, $groupedConditions, $bindings, $dbType, $prefix . $key . $conditionIndex . '_', $level + 1);
|
|
181
|
-
}
|
|
174
|
+
foreach ($value as $conditionKey => $subCondition) {
|
|
175
|
+
if (is_numeric($conditionKey)) {
|
|
176
|
+
self::processConditions($subCondition, $groupedConditions, $bindings, $dbType, $prefix . $key . $conditionKey . '_', $level + 1);
|
|
182
177
|
} else {
|
|
183
|
-
|
|
184
|
-
self::processConditions($subCondition, $groupedConditions, $bindings, $dbType, $prefix . $key . $conditionIndex . '_', $level + 1);
|
|
185
|
-
} else {
|
|
186
|
-
self::processSingleCondition($conditionIndex, $subCondition, $groupedConditions, $bindings, $dbType, $prefix . $key . $conditionIndex . '_', $level + 1);
|
|
187
|
-
}
|
|
178
|
+
self::processSingleCondition($conditionKey, $subCondition, $groupedConditions, $bindings, $dbType, $prefix . $key . $conditionKey . '_', $level + 1);
|
|
188
179
|
}
|
|
189
180
|
}
|
|
181
|
+
if (!empty($groupedConditions)) {
|
|
182
|
+
$conditionGroup = '(' . implode(" $key ", $groupedConditions) . ')';
|
|
183
|
+
$sqlConditions[] = $conditionGroup;
|
|
184
|
+
}
|
|
190
185
|
}
|
|
191
186
|
if (!empty($groupedConditions)) {
|
|
192
187
|
$conditionGroup = '(' . implode(" $key ", $groupedConditions) . ')';
|