Implement the SQL-standard (SQL:2016 §14.11) DEFAULT keyword inside
INSERT VALUES lists, allowing explicit use of column defaults on a
per-value basis:
INSERT INTO t (a, b) VALUES (1, DEFAULT), (DEFAULT, 2);
This feature does not exist in SQLite — it is a Turso extension as
part of our effort to make Turso behave more like Postgres, which has
supported this syntax for a long time. The motivation is that omitting
columns from the INSERT column list applies defaults uniformly across
all rows, but DEFAULT in VALUES lets different rows use defaults for
different columns within the same statement.
Expr::Default is resolved to the actual column default expression (or
NULL) in the AST before bytecode compilation, so both single-row and
multi-row INSERT paths work without special-casing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comprehensive SQL reference at docs/sql-reference/ covering all
supported statements, functions, expressions, PRAGMAs, and
extensions. Includes mdBook-based local preview (./preview.sh).
Turso-specific features (CDC, materialized views, custom types,
MVCC, vector search, FTS, encryption) are integrated inline with
callouts. Experimental features link to a dedicated page with
enablement instructions for the CLI and all SDKs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>