Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix iLike() falsely turning escaped % and _ into wildcards
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen authored and backportbot[bot] committed Nov 11, 2020
commit ddc94e44b76fdec2e52971fb1370e792d971885d
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ public function like($x, $y, $type = null) {
* @inheritdoc
*/
public function iLike($x, $y, $type = null) {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
return new QueryFunction('REGEXP_LIKE(' . $x . ', \'^\' || REPLACE(REPLACE(' . $y . ', \'%\', \'.*\'), \'_\', \'.\') || \'$\', \'i\')');
return $this->like($this->functionBuilder->lower($x), $this->functionBuilder->lower($y));
}
}