mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
The Expression LIKE binary operator does not care about escape % and _ char. No-one has already open an issue about it but in the OGC element PropertyIsLike the user can defined is own wild and single char. This mean that QGIS has to escape % and _ if they are not used as wild and single char.
25 lines
1.2 KiB
Plaintext
25 lines
1.2 KiB
Plaintext
{
|
|
"name": "ILIKE",
|
|
"type": "operator",
|
|
"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."}
|
|
],
|
|
"examples": [
|
|
{ "expression":"'A' ILIKE 'A'", "returns":"1"},
|
|
{ "expression":"'A' ILIKE 'a'", "returns":"1"},
|
|
{ "expression":"'A' ILIKE 'B'", "returns":"0"},
|
|
{ "expression":"'ABC' ILIKE 'b'", "returns":"0"},
|
|
{ "expression":"'ABC' ILIKE 'B'", "returns":"0"},
|
|
{ "expression":"'ABC' ILIKE '_b_'", "returns":"1"},
|
|
{ "expression":"'ABC' ILIKE '_B_'", "returns":"1"},
|
|
{ "expression":"'ABCD' ILIKE '_b_'", "returns":"0"},
|
|
{ "expression":"'ABCD' ILIKE '_B_'", "returns":"0"},
|
|
{ "expression":"'ABCD' ILIKE '_b%'", "returns":"1"},
|
|
{ "expression":"'ABCD' ILIKE '_B%'", "returns":"1"},
|
|
{ "expression":"'ABCD' ILIKE '%b%'", "returns":"1"},
|
|
{ "expression":"'ABCD' ILIKE '%B%'", "returns":"1"}
|
|
]
|
|
}
|