Skip to content

Commit

Permalink
Merge pull request #46239 from DelazJ/ILikeBackslash
Browse files Browse the repository at this point in the history
Double espace backslash in (I)Like functions help and add examples
  • Loading branch information
troopa81 committed Nov 26, 2021
2 parents 15fbd6a + 74a5e44 commit 47fde44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions resources/function_help/json/ILIKE
Expand Up @@ -5,7 +5,7 @@
"description": "Returns 1 if the first parameter matches case-insensitive the supplied pattern. LIKE can be used instead of ILIKE to make the match case-sensitive. Works with numbers also.",
"arguments": [
{"arg":"string/number","description":"string to search"},
{"arg":"pattern","description":"pattern to find, you can use '%' as a wildcard, '_' as a single char and '\\\\' to escape."}
{"arg":"pattern","description":"pattern to find, you can use '%' as a wildcard, '_' as a single char and '\\\\\\\\' to escape these special characters."}
],
"examples": [
{ "expression":"'A' ILIKE 'A'", "returns":"1"},
Expand All @@ -20,6 +20,8 @@
{ "expression":"'ABCD' ILIKE '_b%'", "returns":"1"},
{ "expression":"'ABCD' ILIKE '_B%'", "returns":"1"},
{ "expression":"'ABCD' ILIKE '%b%'", "returns":"1"},
{ "expression":"'ABCD' ILIKE '%B%'", "returns":"1"}
{ "expression":"'ABCD' ILIKE '%B%'", "returns":"1"},
{ "expression":"'ABCD%' ILIKE 'abcd\\\\\\\\%'", "returns":"1"},
{ "expression":"'ABCD' ILIKE '%B\\\\\\\\%'", "returns":"0"}
]
}
6 changes: 3 additions & 3 deletions resources/function_help/json/LIKE
Expand Up @@ -5,7 +5,7 @@
"description": "Returns 1 if the first parameter matches the supplied pattern. Works with numbers also.",
"arguments": [
{"arg":"string/number","description":"value"},
{"arg":"pattern","description":"pattern to compare value with, you can use '%' as a wildcard, '_' as a single char and '\\\\' to escape."}
{"arg":"pattern","description":"pattern to compare value with, you can use '%' as a wildcard, '_' as a single char and '\\\\\\\\' to escape these special characters."}
],
"examples": [
{ "expression":"'A' LIKE 'A'", "returns":"1"},
Expand All @@ -16,7 +16,7 @@
{ "expression":"'ABCD' LIKE '_B_'", "returns":"0"},
{ "expression":"'ABCD' LIKE '_B%'", "returns":"1"},
{ "expression":"'ABCD' LIKE '%B%'", "returns":"1"},
{ "expression":"'1%' LIKE '1\\\\%'", "returns":"1"},
{ "expression":"'1_' LIKE '1\\\\%'", "returns":"0"}
{ "expression":"'1%' LIKE '1\\\\\\\\%'", "returns":"1"},
{ "expression":"'1_' LIKE '1\\\\\\\\%'", "returns":"0"}
]
}

0 comments on commit 47fde44

Please sign in to comment.