Closed gyu-dave closed 9 months ago
Looks like it was a "me" issue and had incorrectly formatted SQL, so closing the ticket. Sorry to be a bother.
Here is the formatted solution that worked, for any one searching:
q.orWhereRaw("content::json->>'title' ilike '%' || ? || '%'", [query.filters.title])
Package version
20.1.0
Describe the bug
When using the
whereRaw
ororWhereRaw
lucid methods to query a JSONB column, I receive the following error:The query in question is either of the following:
~The underlying knex query works fine and will do as a work around~ It appears the knex query also doesn't work, so possibly not a lucid issue and may be knex or... myself
I can attach a reproduction repo if needed, just need some time to get it together
Thanks a heap
Reproduction repo
No response