agrestio / agrest

Server-side Java REST Framework for easy access to data graphs from various backends
https://agrest.io
Apache License 2.0
80 stars 34 forks source link

Support for escape char in "like" expressions #594

Closed andrus closed 1 year ago

andrus commented 1 year ago

There should be a way to redefine an "escape" char in "like" expressions, so that users could build queries with '%' and '_' not treated as wildcards. E.g.:

name like 'A$%bcd%' escape '$'

// matches "A%bcde", but not "Aabcde"

Now that #582 is implemented, we are no longer relying on Cayenne expression parser (which does not support escape chars). So we can implement this now.