2

I would like to retrieve records of kiscourse where the related joblist.job has a value that contains tech within the joblist.job string value.

This returns the expected results:

/joblist?select=job,kiscourse_id(*)&limit=10&job=ilike.*tech*

This does not:

/kiscourse?select=*,joblist(*)&limit=10&joblist.job=ilike.*tech*

And according to: https://postgrest.com/en/v4.1/api.html#embedded-filters-and-order, this seems to be the intended:


> GET /films?select=*,roles(*)&roles.character=in.Chico,Harpo,Groucho
> HTTP/1.1

Once again, this restricts the roles included to certain characters but does not filter the films in any way. Films without any of those characters would be included along with empty character lists.


Is there any way to accomplish the above (besides procedures)?

Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286

1 Answers1

2

the joblist.job filter you have there will affect only the entities on the second level, it does not apply to the first level.

The way to read this query /kiscourse?select=*,joblist(*)&limit=10&joblist.job=ilike.*tech* is this:

Give me 10 rows from kiscourse with all the columns, and for each row, i want the joblists for that row that are named *tech*

Ruslan Talpa
  • 533
  • 3
  • 8