Expand description
LIKE and ILIKE (packages/zql/src/builder/like.ts).
JS compiles a pattern without wildcards to a (lowercased) string
comparison, and anything else to a non-Unicode RegExp with the s flag.
That regexp works on UTF-16 code units: _ matches one code unit (half of
a surrogate pair), and i folds case per code unit through simple
uppercasing. This reproduces both paths.
Structs§
- Invalid
Pattern - Like
Pattern - A compiled
LIKEorILIKEpattern.
Functions§
- escape_
like - Escapes the wildcards of
value(%and_) for aLIKEpattern (packages/zql/src/query/escape-like.ts).