supabase-community / postgrest-csharp

A C# Client library for Postgrest
https://supabase-community.github.io/postgrest-csharp/api/Postgrest.html
MIT License
114 stars 22 forks source link

Specify top-level filtering #50

Closed bdcodestuff closed 1 year ago

bdcodestuff commented 1 year ago

Hi -- the new changes in the latest release that enable resource embedding have been working great, thanks again!

I had one request though. It seems that by default, the postgrest-csharp library is adding top-level row filtering by inserting !inner in the query a la https://postgrest.org/en/stable/api.html#embedding-with-top-level-filtering. This ignores any top level rows for which there are no nested resources. It would be great to have more fine grained control over this. In my use case I would like all top level rows returned even if the nested resources contains no rows. Is there currently a way to control this, and if not could it be added?

acupofjose commented 1 year ago

@bdcodestuff can you look at the PR? Would that do what you're expecting?

bdcodestuff commented 1 year ago

Yes, that looks perfect! Thanks for the quick reply.

acupofjose commented 1 year ago

@bdcodestuff happy to! I changed it to a boolean value instead of an enum (see pull). But it's available in version 2.1.1!