Skip to content

feat(analysis): support typed PostgreSQL returning writes - #20

Merged
omer-cengel merged 1 commit into
masterfrom
feature/typed-postgresql-returning-writes
Sep 21, 2026
Merged

omer-cengel merged 1 commit into
masterfrom
feature/typed-postgresql-returning-writes

Conversation

@omer-cengel

Copy link
Copy Markdown
Member

Summary

Add typed row results for supported PostgreSQL write statements so generated code can return database-generated identifiers and resulting rows through the existing query APIs.

Changes

  • Analyze direct target columns and bare RETURNING * on supported INSERT, UPDATE, and DELETE statements declared as :one or :many.
  • Preserve schema types, nullability, returned-column order, logical parameter order, and textual JDBC binding order.
  • Reuse existing generated result records, positional row mappers, and query/queryMany runtime paths.
  • Reject incompatible annotations, unsupported returning expressions, qualified wildcards, unknown columns, and excluded write shapes before generation.
  • Cover generated-source compilation and live PostgreSQL behavior for generated identifiers, nullable results, repeated parameters, and empty or multi-row results.

Scope and non-goals

This change is limited to existing single-table write shapes with unaliased direct returned columns or bare *. It does not add computed or aliased returning expressions, qualified wildcards, upserts, multi-row or select-based inserts, joined writes, writable CTEs, generated-key APIs, transactions, new query types, or generalized expression analysis.

@omer-cengel
omer-cengel merged commit 046f400 into master Sep 21, 2026
6 checks passed
@omer-cengel
omer-cengel deleted the feature/typed-postgresql-returning-writes branch September 21, 2026 20:03
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.

1 participant