We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The current bundle version is not working on postgres as the SQL errors with:
It should not error.
What are the steps to reproduce this bug? Please add code examples, screenshots or links to GitHub repositories that reproduce the problem.
<?php namespace App\Doctrine\Extension\Postgresql; use Doctrine\ORM\Query\AST\Functions\FunctionNode; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; use Doctrine\ORM\Query\TokenType; class SimilarTo extends FunctionNode { public $value = null; public $regexp = null; public function parse(Parser $parser): void { $parser->match(TokenType::T_IDENTIFIER); $parser->match(TokenType::T_OPEN_PARENTHESIS); $this->value = $parser->StringPrimary(); $parser->match(TokenType::T_COMMA); $this->regexp = $parser->StringExpression(); $parser->match(TokenType::T_CLOSE_PARENTHESIS); } public function getSql(SqlWalker $sqlWalker): string { return '(' . $this->value->dispatch($sqlWalker) . ' SIMILAR TO ' . $this->regexp->dispatch($sqlWalker) . ')'; } }
doctrine: orm: dql: string_functions: App\Doctrine\Extension\Postgresql\SimilarTo
The text was updated successfully, but these errors were encountered:
I can confirm this solution actually works on Postgres but the configuration needs to be amended slightly for Symfony 7.
Postgres
doctrine: orm: dql: string_functions: REGEXP: App\Doctrine\Extension\Postgresql\SimilarTo
Sorry, something went wrong.
No branches or pull requests
Actual Behavior
The current bundle version is not working on postgres as the SQL errors with:
Expected Behavior
It should not error.
Steps to Reproduce
What are the steps to reproduce this bug? Please add code examples,
screenshots or links to GitHub repositories that reproduce the problem.
Possible Solutions
The text was updated successfully, but these errors were encountered: