Fix ILIKE regex for oracle

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-07-24 11:39:53 +02:00
parent fc22a2cb07
commit bb58667511
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
1 changed files with 1 additions and 1 deletions

View File

@ -166,6 +166,6 @@ class OCIExpressionBuilder extends ExpressionBuilder {
public function iLike($x, $y, $type = null) {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
return new QueryFunction('REGEXP_LIKE('.$x.', \'^\' || REPLACE('.$y.', \'%\', \'.*\') || \'$\', \'i\')');
return new QueryFunction('REGEXP_LIKE(' . $x . ', \'^\' || REPLACE(REPLACE(' . $y . ', \'%\', \'.*\'), \'_\', \'.\') || \'$\', \'i\')');
}
}