Skip to content

fix(postgrest): resolve nullable Value comparisons to mapped columns - #430

Merged
Tr00d merged 2 commits into
supabase:masterfrom
PhuocOng:fix/postgrest-nullable-value
Sep 14, 2026
Merged

fix(postgrest): resolve nullable Value comparisons to mapped columns#430
Tr00d merged 2 commits into
supabase:masterfrom
PhuocOng:fix/postgrest-nullable-value

Conversation

@PhuocOng

Copy link
Copy Markdown
Contributor

Fixes #429.

Where(row => row.IntValue.Value > 3) used the Nullable<T>.Value member name instead of the mapped column:

before  Value=gt.3
after   int_value=gt.3

Both comparison paths now use the existing ResolveColumn helper, as Contains already does. URL tests cover direct/cast comparisons, nullable primary keys and a captured-value control. A live PostgREST test verifies that null and nonmatching rows are excluded.

Also renames the existing private ParameterFinder._target field to target: the touched-file format gate flags its old name as IDE1006. No API or behavior change from that rename, and no baseline/dependency changes are included.

Validation

  • Before the fix: the existing 143 PostgREST non-E2E tests pass; the new URL assertion fails with Value=gt.3.
  • Full SDK quality gate: bash scripts/quality-gate/gate.sh packages reports PASS, without --bypass-format or --overwrite-baseline. All 920 tests across eight packages pass with no skips, including live Supabase E2E; the Windows job also passes 147 PostgREST unit/contract tests.

The three files in this PR match the verified source exactly. Tests ran on GitHub-hosted runners; validation workflows stay on the fork. Public-API diff: no public surface change. No cross-SDK API/parity change is introduced.

AI-assisted with GitHub Copilot.

Quality gate summary (verbatim)
  [B] Build (analyzers)
        PASS Core        0, at baseline
        PASS Functions   10, at baseline
        PASS Gotrue      300, at baseline
        PASS Postgrest   142, at baseline
        PASS Realtime    54, at baseline
        PASS Storage     236, at baseline
        PASS Supabase    16, at baseline
        PASS DependencyInjection 0, at baseline
  [B] Format + naming
        PASS Postgrest   3 changed file(s) clean
  [B] Tests (Unit + Contract + E2E)
        PASS Core        Passed!  - Failed:     0, Passed:    71, Skipped:     0, Total:    71, Duration: 411 ms - Core.Tests.dll (net10.0)
        PASS Functions   Passed!  - Failed:     0, Passed:    53, Skipped:     0, Total:    53, Duration: 2 s - Functions.Tests.dll (net10.0)
        PASS Gotrue      Passed!  - Failed:     0, Passed:   206, Skipped:     0, Total:   206, Duration: 15 s - Gotrue.Tests.dll (net10.0)
        PASS Postgrest   Passed!  - Failed:     0, Passed:   229, Skipped:     0, Total:   229, Duration: 2 s - Postgrest.Tests.dll (net10.0)
        PASS Realtime    Passed!  - Failed:     0, Passed:   132, Skipped:     0, Total:   132, Duration: 12 s - Realtime.Tests.dll (net10.0)
        PASS Storage     Passed!  - Failed:     0, Passed:   171, Skipped:     0, Total:   171, Duration: 3 s - Storage.Tests.dll (net10.0)
        PASS Supabase    Passed!  - Failed:     0, Passed:    54, Skipped:     0, Total:    54, Duration: 444 ms - Supabase.Tests.dll (net10.0)
        PASS DependencyInjection Passed!  - Failed:     0, Passed:     4, Skipped:     0, Total:     4, Duration: 93 ms - DependencyInjection.Tests.dll (net10.0)
  [B] Coverage (line, unit+contract)
        PASS Core        100.00%, at baseline · full incl. E2E: 100.00% (121/121)
        PASS Functions   98.34%, at baseline · full incl. E2E: 98.34% (178/181)
        PASS Gotrue      51.32%, at baseline · full incl. E2E: 76.89% (1221/1588)
        PASS Postgrest   70.46%, at baseline · full incl. E2E: 85.19% (1214/1425)
        PASS Realtime    46.50%, at baseline · full incl. E2E: 82.40% (1035/1256)
        PASS Storage     line coverage 77.15%→79.03% — raising baseline · full incl. E2E: 90.59% (972/1073)
        PASS Supabase    82.94%, at baseline · full incl. E2E: 88.49% (223/252)
        PASS DependencyInjection 100.00%, at baseline · full incl. E2E: 100.00% (33/33)
  [s] Dependency vulnerabilities
        PASS none known
  [B] Public API declared
        PASS PublicAPI.*.txt matches the compiled surface
  [s] Public API diff
        PASS no public surface change

GATE: PASS (exit 0) — blocking stages green; signal stages are the maintainer's call.

@Tr00d Tr00d left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Well done, and thanks for your contribution 👍

@Tr00d
Tr00d merged commit a3c50b0 into supabase:master Sep 14, 2026
2 checks passed
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.

bug(postgrest): Where uses Value as the column for nullable comparisons

2 participants