create-prisma-php-app 1.16.30 → 1.16.31
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.
|
@@ -248,8 +248,10 @@ abstract class Utility
|
|
|
248
248
|
case 'endsWith':
|
|
249
249
|
case 'equals':
|
|
250
250
|
case 'not':
|
|
251
|
-
if ($val === null
|
|
252
|
-
$sqlConditions[] =
|
|
251
|
+
if ($val === null) {
|
|
252
|
+
$sqlConditions[] = "$fieldQuoted IS NOT NULL";
|
|
253
|
+
} elseif ($val === '') {
|
|
254
|
+
$sqlConditions[] = "$fieldQuoted != ''";
|
|
253
255
|
} else {
|
|
254
256
|
$validatedValue = Validator::string($val);
|
|
255
257
|
$likeOperator = $condition === 'contains' ? ($dbType == 'pgsql' ? 'ILIKE' : 'LIKE') : '=';
|
|
@@ -274,7 +276,6 @@ abstract class Utility
|
|
|
274
276
|
$inPlaceholders = [];
|
|
275
277
|
foreach ($val as $i => $inVal) {
|
|
276
278
|
$inKey = $bindingKey . "_" . $i;
|
|
277
|
-
// Assuming the values are strings; adjust validation as necessary.
|
|
278
279
|
$validatedValue = Validator::string($inVal);
|
|
279
280
|
$inPlaceholders[] = $inKey;
|
|
280
281
|
$bindings[$inKey] = $validatedValue;
|
|
@@ -289,12 +290,16 @@ abstract class Utility
|
|
|
289
290
|
}
|
|
290
291
|
}
|
|
291
292
|
} else {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
293
|
+
if ($value === null) {
|
|
294
|
+
$sqlConditions[] = "$fieldQuoted IS NULL";
|
|
295
|
+
} elseif ($value === '') {
|
|
296
|
+
$sqlConditions[] = "$fieldQuoted = ''";
|
|
297
|
+
} else {
|
|
298
|
+
$bindingKey = ":" . $prefix . $key . $level;
|
|
299
|
+
$validatedValue = Validator::string($value);
|
|
300
|
+
$sqlConditions[] = "$fieldQuoted = $bindingKey";
|
|
301
|
+
$bindings[$bindingKey] = $validatedValue;
|
|
302
|
+
}
|
|
298
303
|
}
|
|
299
304
|
}
|
|
300
305
|
|