ash json api filters
on swagger ui page, I see this king of spec. so, in the
filter
I can use q_explanation="some_string"&year=2011
How do I input >
or <
when writing nested filters for this?
Claude has been really unhelpful at this.10 Replies
or
ilike
query.filter[explanation][ilike]="some-text"
the expression is correct, however it does not work as expected.
The ilike is actually not executed.
filter[q_explanation][contains]
works !
(c0."q_explanation"::text LIKE $3) [2011, 2020, "%Commission%"]
I think there is a bug in ilike
implementation🤔
Whats the bug?
You included encoded quotes in your filter, did you mean to do that?
When I don't include quotes, then
and the SQL it runs is
there is no
%Commission%
🤔
Its not assuming that you want
%
around the text
you send that from the clientI see.
it assumes that in
filter[q_explanation][contains]
:pNo, those are just different functions
contains
means "does this string appear in the other string"
ilike means "does this string match the provided pattern"this works.
Will read it that way.
Thanks a lot for removing the confusion.
🙇♂️