The best way to build a modern backend + admin UI. No black magic, all TypeScript, and fully open-source, Payload is both an app framework and a headless CMS.
Both of is like and contains filter does case-insensitive search by postgres ILIKE operator, and the issued SQL and search results are idential.
I guess that is like should do case-sensitive search by postgres LIKE operator.
To Reproduce
You can reproduce the problem by _community app:
Filter by is like condition
SQL
select "posts"."id", "posts"."text", "posts"."title", "posts"."updated_at", "posts"."created_at", "posts__rels"."data" as "_rels" from "posts" left join lateral (select coalesce(json_agg(json_build_array("posts__rels"."order", "posts__rels"."path", "posts__rels"."media_id") order by "posts__rels"."order" asc), '[]'::json) as "data" from (select * from "posts_rels" "posts__rels" where "posts__rels"."parent_id" = "posts"."id" order by "posts__rels"."order" asc) "posts__rels") "posts__rels" on true where "posts"."text" ilike $1 order by "posts"."title" asc limit $2
Filter by contains condition
SQL
select "posts"."id", "posts"."text", "posts"."title", "posts"."updated_at", "posts"."created_at", "posts__rels"."data" as "_rels" from "posts" left join lateral (select coalesce(json_agg(json_build_array("posts__rels"."order", "posts__rels"."path", "posts__rels"."media_id") order by "posts__rels"."order" asc), '[]'::json) as "data" from (select * from "posts_rels" "posts__rels" where "posts__rels"."parent_id" = "posts"."id" order by "posts__rels"."order" asc) "posts__rels") "posts__rels" on true where "posts"."text" ilike $1 order by "posts"."title" asc limit $2
Link to reproduction
No response
Describe the Bug
Both of
is like
andcontains
filter does case-insensitive search by postgresILIKE
operator, and the issued SQL and search results are idential. I guess thatis like
should do case-sensitive search by postgresLIKE
operator.To Reproduce
You can reproduce the problem by
_community
app:Filter by
is like
conditionSQL
Filter by
contains
conditionSQL
Payload Version
2.22.0 (db-postgres: 0.8.5)
Adapters and Plugins
No response