-
-
Notifications
You must be signed in to change notification settings - Fork 371
feat(postgrest): implement max_affected method #1222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
o-santi
merged 1 commit into
main
from
guilherme/clibs-380-postgrest-py-implement-maxaffected-method
Sep 22, 2025
Merged
feat(postgrest): implement max_affected method #1222
o-santi
merged 1 commit into
main
from
guilherme/clibs-380-postgrest-py-implement-maxaffected-method
Sep 22, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add max_affected method to BaseFilterRequestBuilder to set the maximum number of rows that can be affected by PATCH and DELETE operations. - Adds handling=strict and max-affected={value} to Prefer header - Supports method chaining by returning self - Available in both sync and async FilterRequestBuilder classes - Includes comprehensive test coverage for all scenarios Equivalent to maxAffected method in postgrest-js library. Only works with PostgREST v13+ and PATCH/DELETE methods. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Pull Request Test Coverage Report for Build 17909755902Details
💛 - Coveralls |
mandarini
approved these changes
Sep 22, 2025
o-santi
approved these changes
Sep 22, 2025
Merged
grdsdev
added a commit
to supabase/supabase
that referenced
this pull request
Sep 30, 2025
grdsdev
added a commit
to supabase/supabase
that referenced
this pull request
Sep 30, 2025
grdsdev
added a commit
to supabase/supabase
that referenced
this pull request
Sep 30, 2025
grdsdev
added a commit
to supabase/supabase
that referenced
this pull request
Sep 30, 2025
grdsdev
added a commit
to supabase/supabase
that referenced
this pull request
Sep 30, 2025
Add documentation for the new max_affected() method introduced in supabase-py PR #1222. This method allows limiting the number of rows that can be affected by update or delete operations. Changes: - Added max_affected() method documentation to supabase_py_v2.yml - Included parameter details and usage notes - Added two examples: one for update and one for delete operations - Documented PostgREST v13+ requirement and PATCH/DELETE method limitation Source: supabase/supabase-py#1222 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implements the equivalent of the
maxAffected
method from postgrest-js library for the Python postgrest client.max_affected
method toBaseFilterRequestBuilder
classhandling=strict
andmax-affected={value}
preferences in Prefer headerself
Changes
Implementation
max_affected(value: int)
method toBaseFilterRequestBuilder
insrc/postgrest/base_request_builder.py
handling=strict
max_affected
vsmaxAffected
)Tests
update()
anddelete()
operationsUsage
Test plan
Notes
maxAffected
method in postgrest-js🤖 Generated with Claude Code