I'm using TYPO3 version 8.7.x and I'm currently struggeling with using an "rlike" expression in combination with the QueryBuilder.
Here is a snippet:
$this->getQueryBuilder()
->select('uid')
->from(self::DEFAULT_TABLE)
->where(
$this->getQueryBuilder()->expr()-> // here I expected the rlike expression
)
Question: Since there is no build in method for rlike, how do I build an where-clause with regex expressions?
I already figured out that comparison($leftExpression, string $operator, $rightExpression)
can be used to force an rlike-string but if used you have to exploit the missing $operator
check to include an 'rlike' statement.
By default $operator should be used as an ExpressionBuilder constant.
@param string $operator One of the ExpressionBuilder::* constants.
Sidenote: The comparison
-function might be used as an expolit if you are working with generic statements. So I would like to avoid this way
The QueryBuilder is using an instance of \Doctrine\DBAL\Query\Expression\ExpressionBuilder