replace regexp with its postgres version

This commit is contained in:
Matthew Bucci
2024-10-17 02:45:32 -07:00
parent 90d1c47695
commit d0eab624eb
2 changed files with 19 additions and 5 deletions
+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)) {