mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-01-21 18:48:34 +08:00
Postgres-style ILIKE operator (with Unicode support) (#244)
Access's `LIKE` is actually case-insensitive, but to prevent breaking existing programs that rely on mdbtools' case-sensitive behavior, introduce a new `ILIKE` operator to perform a case-insensitive match. Use GLib's `g_utf8_casefold` to make the comparison UTF-8 aware. A "poor man's" version is implemented in fakeglib, which relies on `towlower`, and won't work with multi-grapheme case transformations (e.g. German Eszett). Fixes #233
This commit is contained in:
@@ -50,7 +50,7 @@ SQL LANGUAGE
|
||||
|
||||
limit clause: LIMIT <integer>
|
||||
|
||||
operator: =, =>, =<, <>, like, <, >
|
||||
operator: =, =>, =<, <>, like, ilike, <, >
|
||||
|
||||
literal: integers, floating point numbers, or string literal in single quotes
|
||||
|
||||
@@ -63,6 +63,10 @@ NOTES
|
||||
|
||||
The -i command can be passed the string 'stdin' to test entering text as if using a pipe.
|
||||
|
||||
The 'like' operator performs a case-sensitive pattern match, with ANSI-style wildcards. An underscore in the pattern will match any single character, and a percent sign will match any run of characters.
|
||||
|
||||
The 'ilike' operator is similar, but performs a case-insensitive pattern match.
|
||||
|
||||
ENVIRONMENT
|
||||
LC_COLLATE Defines the locale for string-comparison operations. See locale(1).
|
||||
MDB_JET3_CHARSET Defines the charset of the input JET3 (access 97) file. Default is CP1252. See iconv(1).
|
||||
|
||||
Reference in New Issue
Block a user