replace regexp with its postgres version

This commit is contained in:
Matthew Bucci committed 2024-10-17 02:45:32 -07:00
1 parent 90d1c47695
commit d0eab624eb
2 files changed
+19 -5

No files matched your search

+3
View File
@@ -65,6 +65,9 @@ class SelectSQLRewriter extends AbstractSQLRewriter
// Handle COUNT(*)...ORDER BY...
$sql = preg_replace('/COUNT(.+)ORDER BY.+/s', 'COUNT$1', $sql);
// HANDLE REGEXP
$sql = preg_replace('/REGEXP/', '~', $sql);
// In order for users counting to work...
$matches = array();
if(preg_match_all('/COUNT[^C]+\),/', $sql, $matches)) {