Skip to content

fix(postgrest): don't put a dot before nested and/or groups - #389

Open
fresh55 wants to merge 1 commit into
supabase-community:masterfrom
fresh55:fix/postgrest-nested-logical-groups
Open

fix(postgrest): don't put a dot before nested and/or groups#389
fresh55 wants to merge 1 commit into
supabase-community:masterfrom
fresh55:fix/postgrest-nested-logical-groups

Conversation

@fresh55

@fresh55 fresh55 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

closes #336

three or more || terms nest, and the nested group got a dot, which postgrest rejects:

before  or=(or.(first_name.like.*Ran*,middle_name.like.*Ran*),last_name.like.*Ran*)   400 PGRST100
after   or=(or(first_name.like.*Ran*,middle_name.like.*Ran*),last_name.like.*Ran*)    200

only column filters take the dot, a group is already parenthesized. negated groups nest as not.and(...).

also fixes .Or()/.And() with a nested group, both go through PrepareFilter.

didn't flatten to or=(a,b,c) - that was tried in supabase-community/postgrest-csharp#110 and needs a visitor rewrite. the nested form is valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't use Table<TModel>.Where(Expression<Func<TModel, bool>> predicate) with more than 2 or'ed conditions in the predicate expression

1 participant