From ec9355708cba2363111512338f03d870c23fa64d Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sun, 14 Jul 2019 23:50:34 -0400 Subject: [PATCH] Added comment about like [skip ci] --- lib/searchkick/query.rb | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) diff --git a/lib/searchkick/query.rb b/lib/searchkick/query.rb index 10f7ed6..1c11f60 100644 --- a/lib/searchkick/query.rb +++ b/lib/searchkick/query.rb @@ -936,6 +936,11 @@ module Searchkick } } when :like + # based on Postgres + # https://www.postgresql.org/docs/current/functions-matching.html + # % matches zero or more characters + # _ matches one character + # \ is escape character regex = Regexp.escape(op_value).gsub(/(? {value: regex}}} when :prefix -- libgit2 0.21.0