Skip to content

Commit 6ecbc30

Browse files
committed
fix: BaseBuilder::getOperatorFromWhereKey() misses operator EXISTS, BETWEEN
1 parent d333c7b commit 6ecbc30

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

system/Database/BaseBuilder.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3413,13 +3413,17 @@ private function getOperatorFromWhereKey(string $whereKey)
34133413
$whereKey = trim($whereKey);
34143414

34153415
$pregOperators = [
3416-
'\s*(?:<|>|!)?=', // =, <=, >=, !=
3417-
'\s*<>?', // <, <>
3418-
'\s*>', // >
3419-
'\s+IS NULL', // IS NULL
3420-
'\s+IS NOT NULL', // IS NOT NULL
3421-
'\s+LIKE', // LIKE
3422-
'\s+NOT LIKE', // NOT LIKE
3416+
'\s*(?:<|>|!)?=', // =, <=, >=, !=
3417+
'\s*<>?', // <, <>
3418+
'\s*>', // >
3419+
'\s+IS NULL', // IS NULL
3420+
'\s+IS NOT NULL', // IS NOT NULL
3421+
'\s+EXISTS\s*\(.*\)', // EXISTS (sql)
3422+
'\s+NOT EXISTS\s*\(.*\)', // NOT EXISTS (sql)
3423+
'\s+BETWEEN\s+', // BETWEEN value AND value
3424+
'\s+IN\s*\(.*\)', // IN (list)
3425+
'\s+LIKE', // LIKE
3426+
'\s+NOT LIKE', // NOT LIKE
34233427
];
34243428

34253429
return preg_match_all(

0 commit comments

Comments
 (0)