Skip to content

test(postgrest): cover rpc(get: true) with not. and unclosed full-text search arguments - #2278

Merged
spydon merged 1 commit into
mainfrom
lukasklingsbo/sdk-3338-rpc-get-fts-prefix
Dec 3, 2026
Merged

spydon merged 1 commit into
mainfrom
lukasklingsbo/sdk-3338-rpc-get-fts-prefix

Conversation

@spydon

@spydon spydon commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Tests for which method rpc(get: true) picks for filter-like arguments. The not. fix itself landed in #2273.

  • not.available is sent as a POST, in unit and integration tests.
  • An unclosed modifier such as wfts(english stays a GET: the integration test shows PostgREST passes it to the function.
  • fts(x)y and nothing.new also stay a GET.

SDK-3338

@github-actions github-actions Bot added the postgrest This issue or pull request is related to postgrest label Dec 3, 2026
@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The RPC query-fit check now requires not. to precede a recognized filter operator. Tests cover GET and POST selection for not.-prefixed values and other filter-like values.

Changes: RPC GET/POST query-fit handling

Layer / File(s) Summary
RPC query-fit classification and validation
packages/postgrest/lib/src/postgrest_filter.dart, packages/postgrest/test/transform_request_test.dart, packages/postgrest/test/typed_rpc_test.dart, packages/postgrest/test/typed_rpc_integration_test.dart
The syntax check recognizes not. only before a recognized filter operator. Tests cover POST selection for not.available, GET selection for wfts(english, fts(x)y, and nothing.new, and read-only RPC calls using not.available and wfts(english.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • supabase/supabase-flutter#2272 reports that not.available remains a GET argument and fails with PGRST100. This PR covers that value, but the issue also mentions list and map arguments.

Possibly related PRs

Suggested labels: postgrest

Merge Risk: Minimal · up to a7b63

This change only adds tests for how read-only RPC calls choose between GET and POST. It does not alter production behavior in the files reviewed, and no merge-blocking risk is identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the test change, but the PR objectives describe a behavior change: an RPC argument beginning with not. is sent as a POST instead of a GET. The title says the PR covers tests for `rpc…
Full details: Title check

Explanation

The title names the test change, but the PR objectives describe a behavior change: an RPC argument beginning with not. is sent as a POST instead of a GET. The title says the PR covers tests for rpc(get: true) with not. and unclosed full-text search arguments, which matches the test files in the raw summary. It does not state the main behavior change, so the title is only partially related to the main point. The title is specific and is not vague.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 5c1462e and a7b638b.

Files selected for processing: 1

  • packages/postgrest/test/typed_rpc_test.dart

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@spydon
spydon force-pushed the lukasklingsbo/sdk-3338-rpc-get-fts-prefix branch from 5c1462e to a7b638b Compare December 3, 2026 16:41
@spydon
spydon enabled auto-merge (squash) December 3, 2026 16:44
@spydon spydon changed the title fix(postgrest): send an rpc(get: true) argument starting with not. as a POST test(postgrest): cover rpc(get: true) with not. and unclosed full-text search arguments Dec 3, 2026
@spydon
spydon merged commit 1ab1ce4 into main Dec 3, 2026
63 of 64 checks passed
@spydon
spydon deleted the lukasklingsbo/sdk-3338-rpc-get-fts-prefix branch December 3, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

postgrest This issue or pull request is related to postgrest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant