Skip to content

fix(postgrest): overwrite duplicate pagination parameters - #1620

Closed
Akishore407 wants to merge 1 commit into
supabase:mainfrom
Akishore407:fix/1617-pagination-params
Closed

Akishore407 wants to merge 1 commit into
supabase:mainfrom
Akishore407:fix/1617-pagination-params

Conversation

@Akishore407

Copy link
Copy Markdown

Fixes #1617.

Calling limit(), offset(), or range() multiple times previously added duplicate query parameters instead of replacing the previous value.

This change uses set() instead of add() for pagination parameters so that the latest call takes precedence.

Changes

  • Updated limit() to overwrite existing limit parameters.
  • Updated offset() to overwrite existing offset parameters.
  • Updated range() to overwrite existing offset and limit parameters.
  • Added sync and async tests for repeated calls.

Testing

  • uv run ruff check
  • uv run ruff format --check
  • Targeted sync tests: 3 passed
  • Targeted async tests: 3 passed

@Akishore407
Akishore407 requested review from a team and o-santi as code owners September 6, 2026 15:01
@o-santi o-santi closed this Oct 2, 2026
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.

Calling limit()/offset()/range() twice sends duplicate query params

2 participants