Skip to content

test: exercise everyday SQL expressions in the sample and on PostgreSQL - #61

Merged
omer-cengel merged 2 commits into
masterfrom
chore/sample-everyday-sql-expressions
Oct 4, 2026
Merged

omer-cengel merged 2 commits into
masterfrom
chore/sample-everyday-sql-expressions

Conversation

@omer-cengel

Copy link
Copy Markdown
Member

Summary

Extends the external Maven sample and the PostgreSQL integration tests so that the recently supported SQL idioms (named parameters, non-binding write values such as now(), cast-typed placeholders, grouped counts, upserts, and = ANY id lists) run end to end through generated code against a real database. No compiler, generator, or runtime behavior changes.

Changes

  • Sample: a new V4 migration adds a nullable updated_at column to authors, so the shared AuthorsRow record gains LocalDateTime updatedAt.
  • Sample: new queries for an optional name filter (:name::text IS NULL OR name = :name), a rename that sets updated_at = now(), a per-author book count with GROUP BY, an ON CONFLICT (id) DO UPDATE ... RETURNING * upsert, and an id = ANY(:ids) read.
  • Sample application: a checked step for each new query, covering a null and a named filter, two ids and an empty id list, the grouped count, the rename's updated_at, and an upsert over an existing author.
  • Release verification script: applies the new migration, checks that the five new repository methods and the updatedAt row component are generated, and keeps the existing generated-source and manifest checks.
  • PostgreSQL integration tests: a read of unqualified columns over albums LEFT JOIN studios filtered by tags && $1::varchar[], and an insert that writes NOW() between its placeholders, binds an enum, an enum array, and a text[] value, and returns the generated id.

Scope and non-goals

  • No change to SQL parsing, analysis, code generation, or the runtime.
  • No new tables, constraints, or enums in the sample; the upsert targets the existing primary key and is exercised over an existing row.
  • Constructs that remain unsupported (an unqualified column named like a date unit, a function as the FROM source, an unaliased COUNT(*)) are not newly tested.

@omer-cengel
omer-cengel merged commit 8c8637e into master Oct 4, 2026
6 checks passed
@omer-cengel
omer-cengel deleted the chore/sample-everyday-sql-expressions branch October 4, 2026 20:53
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