Skip to content

SQLite: Support comma-separated WITHOUT ROWID and STRICT table options - #2575

Open
LucaCappelletti94 wants to merge 2 commits into
mainfrom
upstream/sqlite-table-options-list
Open

LucaCappelletti94 wants to merge 2 commits into
mainfrom
upstream/sqlite-table-options-list

Conversation

@LucaCappelletti94

@LucaCappelletti94 LucaCappelletti94 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

SQLite ends CREATE TABLE with a comma-separated list of table options, WITHOUT ROWID and STRICT, in any order and optionally preceded by a comma (SQLite docs).

The parser read the two keywords at unrelated points of the statement, so CREATE TABLE a (id INTEGER PRIMARY KEY) WITHOUT ROWID, STRICT, its reverse and (...), STRICT failed to parse. The one spelling it accepted, WITHOUT ROWID STRICT, is one SQLite refuses, and a table with both options rendered back to it.

The without_rowid and strict flags on CreateTable become one sqlite_table_options field holding the options in source order and whether a comma precedes them. Output therefore matches input, which matters because SQLite stores that text verbatim in sqlite_schema. The comma-less spelling now fails as it does in SQLite. #208 and #898 added each option on its own.

@LucaCappelletti94 LucaCappelletti94 changed the title Upstream/sqlite table options list SQLite: Support comma-separated WITHOUT ROWID and STRICT table options Sep 24, 2026
@codecov-commenter

codecov-commenter commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.54545% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.16%. Comparing base (88ffee6) to head (0854a7f).
⚠️ Report is 23 commits behind head on main.

Files with missing lines Patch % Lines
src/parser/mod.rs 75.00% 0 Missing and 6 partials ⚠️
src/ast/ddl.rs 85.71% 1 Missing and 1 partial ⚠️
src/ast/spans.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2575      +/-   ##
==========================================
+ Coverage   81.02%   81.16%   +0.14%     
==========================================
  Files          42       42              
  Lines       33436    33760     +324     
  Branches    33436    33760     +324     
==========================================
+ Hits        27090    27400     +310     
- Misses       2789     2798       +9     
- Partials     3557     3562       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LucaCappelletti94
LucaCappelletti94 marked this pull request as ready for review September 24, 2026 22:03
@LucaCappelletti94 LucaCappelletti94 added the bug Something isn't working label Sep 24, 2026
@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/sqlite-table-options-list branch from 414cebd to d43d31a Compare October 2, 2026 16:14
@LucaCappelletti94 LucaCappelletti94 added the waiting on reviewer PR needs to be reviewed label Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working SQLite waiting on reviewer PR needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants