Skip to content

Commit

Permalink
upd: CONTAINS function for ORM3
Browse files Browse the repository at this point in the history
  • Loading branch information
j-schumann committed May 16, 2024
1 parent 9507727 commit cec7626
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/ORM/Query/AST/ContainsFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

use Doctrine\ORM\Query\AST\ArithmeticExpression;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\Lexer;
use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\SqlWalker;
use Doctrine\ORM\Query\TokenType;

/**
* Implements support for the postgres-only "@>" operator on jsonb fields or
Expand All @@ -24,12 +24,12 @@ class ContainsFunction extends FunctionNode

public function parse(Parser $parser): void
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$parser->match(TokenType::T_IDENTIFIER);
$parser->match(TokenType::T_OPEN_PARENTHESIS);
$this->expr1 = $parser->ArithmeticExpression();
$parser->match(Lexer::T_COMMA);
$parser->match(TokenType::T_COMMA);
$this->expr2 = $parser->ArithmeticExpression();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
$parser->match(TokenType::T_CLOSE_PARENTHESIS);
}

public function getSql(SqlWalker $sqlWalker): string
Expand Down

0 comments on commit cec7626

Please sign in to comment.