.not_.or_() silently drops the negation
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
Research direction
Start in base_request_builder.py, tracing filter() and or_() to see how the negate_next flag is consumed. Verify the query-builder behavior against local PostgREST 16.2, including the existing .not_.eq() and .not_.in_() cases. Done means .not_.or_("id.eq.1") produces not.or=(id.eq.1) while ordinary or_() behavior remains unchanged.
Written by the indexing model from the issue text.
Description
Chaining .not_ before .or_() drops the negation. .not_.or_("id.eq.1") sends or=(id.eq.1) when it should send not.or=(id.eq.1). You get the opposite rows back with no error.
Checked on current main: .not_.eq() and .not_.in_() correctly produce not.eq / not.in. Only .or_() is wrong. In base_request_builder.py, filter() consumes the negate_next flag, but or_() appends its param directly and never checks it.
Verified against local PostgREST 16.2 that not.or= is valid syntax: or=(id.eq.1) returned row 1, not.or=(id.eq.1) returned everything except row 1.
The not_ docstring says the next filter gets negated, and or_ is a filter. text_search builds params the same direct way so it may have the same problem, but I only verified or_ end to end.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 554
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from supabase/supabase-py
-
bug Client Library - Python FDBK: Bug python realtime
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
supabase/supabase-py#1653 ·
-
bug python realtime
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
supabase/supabase-py#1651 ·
-
bug FDBK: Bug GitHub python storage Vector Buckets
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
supabase/supabase-py#1649 ·
-
auth bug Client Library - Python docs python
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
supabase/supabase-py#1644 · 1 comment ·
-
auth bug Client Library - Python python
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
supabase/supabase-py#1642 ·
All issues in supabase/supabase-py
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100