validation: add table-DDL quirks for the inline CREATE TABLE fixtures - #8
Open
fornwall wants to merge 1 commit into
Open
validation: add table-DDL quirks for the inline CREATE TABLE fixtures#8fornwall wants to merge 1 commit into
fornwall wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several statement tests hardcode CREATE TABLE DDL that is not valid GoogleSQL/Spanner (
INTEGER/TEXT/INT, and noPRIMARY KEY). This adds threeDriverQuirkshooks —BindTestTableDdl,QueryEmptyTableDdl, andSingleIntColumnTableDdl— each defaulting tostd::nullopt, mirroring the existingPrimaryKeyTableDdl/CompositePrimaryKeyTableDdlpattern.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 aPRIMARY 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