Skip to content

fix(postgrest): build the typed transform builder with the row converter - #1850

Merged
spydon merged 1 commit into
mainfrom
lukasklingsbo/fix-typed-transform-builder-row-converter
Sep 17, 2026
Merged

spydon merged 1 commit into
mainfrom
lukasklingsbo/fix-typed-transform-builder-row-converter

Conversation

@spydon

@spydon spydon commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Main does not compile since #1848 and #1849 merged within minutes of each other. #1849 replaced the typed transform builder's PostgrestTable field with a RowConverter<Row> (_rowFromJson), and #1848 added stripNulls, dryRun, maxAffected and csv on top of the old field. Neither PR's CI saw the other, so every check on main and on the open PRs fails at compile time in postgrest_typed_transform_builder.dart:

Error: The getter '_table' isn't defined for the type 'PostgrestTypedTransformBuilder<Row, T>'.

Changes

No public API change. dart analyze on packages and examples is clean, typed_query_test.dart passes (49), DCM is clean.

Summary by CodeRabbit

  • Bug Fixes

    • Improved typed mutation operations so options such as dry runs, affected-row limits, CSV responses, and null stripping consistently preserve the expected result types.
    • Updated typed insert and update usage in mutation scenarios to ensure submitted data is handled with the correct typed representations.
  • Documentation

    • Updated the dry-run example to demonstrate usage with a typed insert value.

#1848 added stripNulls, dryRun, maxAffected and csv to the typed transform
builder while #1849 replaced the builder's table field with a row converter.
Both landed on main without seeing each other, so main does not compile:
the four new methods still pass the removed `_table`, and two of their tests
pass raw maps to the now typed insert and update.
@spydon
spydon requested a review from a team as a code owner September 17, 2026 15:32
@github-actions github-actions Bot added the postgrest This issue or pull request is related to postgrest label Sep 17, 2026
@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: b1e86a07-f54c-49eb-80eb-cb66966ca470

📥 Commits

Reviewing files that changed from the base of the PR and between 333cc5c and 66757bb.

📒 Files selected for processing (2)
  • packages/postgrest/lib/src/postgrest_typed_transform_builder.dart
  • packages/postgrest/test/typed_query_test.dart

Included review availability: Your plan provides up to 4 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The typed transform builder now forwards _rowFromJson to wrapped builders for stripNulls, dryRun, maxAffected, and csv. Two tests now pass typed mutation instances instead of raw maps.

Changes

Typed transform builder

Layer / File(s) Summary
Converter forwarding and typed mutation tests
packages/postgrest/lib/src/postgrest_typed_transform_builder.dart, packages/postgrest/test/typed_query_test.dart
Result modifiers pass _rowFromJson to wrapped builders. The dryRun example and two mutation tests use typed BookInsert and BookUpdate instances. Existing request and response assertions remain unchanged.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: grdsdev

Merge Risk: ⚪ Minimal · up to 66757

This is a localized typed-builder compilation fix with updated typed mutation tests and no identified behavioral or availability risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: constructing the typed transform builder with the row converter to fix compilation failures.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

Comment @coderabbitai help to get the list of available commands.

@QuintinWillison QuintinWillison left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

😬

@spydon
spydon enabled auto-merge (squash) September 17, 2026 15:41
@spydon
spydon merged commit b9dee7b into main Sep 17, 2026
61 of 63 checks passed
@spydon
spydon deleted the lukasklingsbo/fix-typed-transform-builder-row-converter branch September 17, 2026 15:44
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.

2 participants