History

Added escape to query

Dularian committed 4 years ago

Commit 1f0deeb1 parent 456d3ab1 file · +4 −2Browse files

Showing the changes to Source (1 of 1 file). Show all

Unified · Split

Source/Libraries/GSF.Web/Model/ModelController.cs+4−2
@@ -524,8 +524,10 @@ namespace GSF.Web.Model · 523 unmodified lines
524 things = things.Select(t => $"'{t}'").ToList();524 things = things.Select(t => $"'{t}'").ToList();
525 search.SearchText = $"({string.Join(",", things)})";525 search.SearchText = $"({string.Join(",", things)})";
526 }526 }
527 527 string escape = "ESCAPE '$'";
528 return $"[{(search.isPivotColumn ? "AFV_" : "") + search.FieldName}] {search.Operator} {search.SearchText}";528 if(search.Operator != "LIKE")
529 escape = "";
530 return $"[{(search.isPivotColumn ? "AFV_" : "") + search.FieldName}] {search.Operator} {search.SearchText} {escape}";
529 }));531 }));
530 532
531 if (searches.Any())533 if (searches.Any())

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t