Skip to content

Commit

Permalink
Merge pull request #4916 from morozov/issues/4907
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Oct 22, 2021
2 parents aa21fc3 + 5a554ae commit 9e524fd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/SQL/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ final class Parser
private const BRACKET_IDENTIFIER = '(?<!\b(?i:ARRAY))\[(?:[^\]])*\]';
private const MULTICHAR = ':{2,}';
private const NAMED_PARAMETER = ':[a-zA-Z0-9_]+';
private const POSITIONAL_PARAMETER = '\\?';
private const ESCAPED_QUESTION = '\\?\\?';
private const POSITIONAL_PARAMETER = '(?<!\\?)\\?(?!\\?)';
private const ONE_LINE_COMMENT = '--[^\r\n]*';
private const MULTI_LINE_COMMENT = '/\*([^*]+|\*+[^/*])*\**\*/';
private const OTHER = '((?!' . self::SPECIAL . ')' . self::ANY . ')+';
Expand All @@ -61,13 +60,12 @@ public function __construct(bool $mySQLStringEscaping)
self::BACKTICK_IDENTIFIER,
self::BRACKET_IDENTIFIER,
self::MULTICHAR,
self::ESCAPED_QUESTION,
self::ONE_LINE_COMMENT,
self::MULTI_LINE_COMMENT,
self::OTHER,
]);

$this->sqlPattern = sprintf('(%s)+', implode('|', $patterns));
$this->sqlPattern = sprintf('(%s)', implode('|', $patterns));
}

/**
Expand Down

0 comments on commit 9e524fd

Please sign in to comment.