Commit 2e2ea605 authored by Thomas Subera's avatar Thomas Subera Committed by Benjamin Eberlei

fix named_token

regex pattern does not support sql casting using :: operator for example select mydate::date from mytable;
parent 64647f9e
...@@ -33,7 +33,7 @@ use Doctrine\DBAL\Connection; ...@@ -33,7 +33,7 @@ use Doctrine\DBAL\Connection;
class SQLParserUtils class SQLParserUtils
{ {
const POSITIONAL_TOKEN = '\?'; const POSITIONAL_TOKEN = '\?';
const NAMED_TOKEN = ':[a-zA-Z_][a-zA-Z0-9_]*'; const NAMED_TOKEN = '(?<!:):[a-zA-Z_][a-zA-Z0-9_]*';
// Quote characters within string literals can be preceded by a backslash. // Quote characters within string literals can be preceded by a backslash.
const ESCAPED_SINGLE_QUOTED_TEXT = "'(?:[^'\\\\]|\\\\'|\\\\\\\\)*'"; const ESCAPED_SINGLE_QUOTED_TEXT = "'(?:[^'\\\\]|\\\\'|\\\\\\\\)*'";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment