Skip to content

validation: add table-DDL quirks for the inline CREATE TABLE fixtures - #8

Open
fornwall wants to merge 1 commit into
mainfrom
validation/table-ddl-quirks
Open

validation: add table-DDL quirks for the inline CREATE TABLE fixtures#8
fornwall wants to merge 1 commit into
mainfrom
validation/table-ddl-quirks

Conversation

@fornwall

@fornwall fornwall commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Several statement tests hardcode CREATE TABLE DDL that is not valid GoogleSQL/Spanner (INTEGER/TEXT/INT, and no PRIMARY KEY). This adds three DriverQuirks hooks — BindTestTableDdl, QueryEmptyTableDdl, and SingleIntColumnTableDdl — each defaulting to std::nullopt, mirroring the existing PrimaryKeyTableDdl / CompositePrimaryKeyTableDdl pattern.

The bind / query-empty / delete / rollback fixtures now consult their hook and fall back to the exact current literal via value_or, so a driver that overrides nothing is byte-for-byte unaffected. A GoogleSQL/Spanner driver can instead supply valid typed DDL with a PRIMARY KEY (Spanner mandates one).

Only the CREATE TABLE statements are touched; the later INSERT/SELECT/DELETE are left exactly as-is.

🤖 Generated with Claude Code
https://claude.ai/code/session_01JtLEb7yAhv2qAZFoSbzKjp

Add BindTestTableDdl / QueryEmptyTableDdl / SingleIntColumnTableDdl hooks
to DriverQuirks (defaulting to std::nullopt) and wire TestSqlBind,
TestSqlQueryEmpty, TestSqlQueryRowsAffectedDelete(+Stream) and
TestSqlQueryInsertRollback to consult them, keeping the current literal
as the value_or fallback so existing drivers are byte-for-byte unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JtLEb7yAhv2qAZFoSbzKjp
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