mirror of
https://github.com/allankoechke/turso.git
synced 2026-12-05 01:24:45 +00:00
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>