Mercurial > hg > orthanc
comparison OrthancServer/Search/ISqlLookupFormatter.cpp @ 3079:65e2bfa953ef db-changes
ISqlLookupFormatter::FormatWildcardEscape()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 03 Jan 2019 14:03:39 +0100 |
parents | 147497152ce3 |
children | f6de9d25b20d |
comparison
equal
deleted
inserted
replaced
3078:147497152ce3 | 3079:65e2bfa953ef |
---|---|
188 | 188 |
189 std::string parameter = formatter.GenerateParameter(escaped); | 189 std::string parameter = formatter.GenerateParameter(escaped); |
190 | 190 |
191 if (constraint.IsCaseSensitive()) | 191 if (constraint.IsCaseSensitive()) |
192 { | 192 { |
193 comparison = tag + ".value LIKE " + parameter + " ESCAPE '\\'"; | 193 comparison = (tag + ".value LIKE " + parameter + " " + |
194 formatter.FormatWildcardEscape()); | |
194 } | 195 } |
195 else | 196 else |
196 { | 197 { |
197 comparison = "lower(" + tag + ".value) LIKE lower(" + parameter + ") ESCAPE '\\'"; | 198 comparison = ("lower(" + tag + ".value) LIKE lower(" + |
199 parameter + ") " + formatter.FormatWildcardEscape()); | |
198 } | 200 } |
199 } | 201 } |
200 | 202 |
201 break; | 203 break; |
202 } | 204 } |