Does Lucee support any single-character characters in QoQ?

Query query ColdFusion query syntax queries underline as a single-character wildcard and exclude literal underscores with square brackets:

LIKE '_abc' -- any 1 char then abc
LIKE '[_]abc' -- actual underscore char then abc

Lucee (5.1 testing) does not seem to respect the wildcard or escaped version according to the literal underscore. The behavior is the same with or without cfqueryparam.

Lucee has one character-character for QoQ, and if so, how do you avoid that character when you want to find this actual literal?

+4
source share
1 answer

You can do this by highlighting the underscore using the "at" character, for example

LIKE '@_@abc' escape '@'
+6

Source: https://habr.com/ru/post/1667368/


All Articles