diff --git a/lib/semian/activerecord_trilogy_adapter.rb b/lib/semian/activerecord_trilogy_adapter.rb index 80b364ed..6223d56d 100644 --- a/lib/semian/activerecord_trilogy_adapter.rb +++ b/lib/semian/activerecord_trilogy_adapter.rb @@ -91,11 +91,7 @@ def resource_exceptions end # TODO: share this with Mysql2 - QUERY_ALLOWLIST = Regexp.union( - %r{\A(?:/\*.*?\*/)?\s*ROLLBACK}i, - %r{\A(?:/\*.*?\*/)?\s*COMMIT}i, - %r{\A(?:/\*.*?\*/)?\s*RELEASE\s+SAVEPOINT}i, - ) + QUERY_ALLOWLIST = %r{\A(?:/\*.*?\*/)?\s*(ROLLBACK|COMMIT|RELEASE\s+SAVEPOINT)}i def query_allowlisted?(sql, *) QUERY_ALLOWLIST.match?(sql)