Arrays are part of the custom types system alongside STRUCT and UNION,
but were only documented in the array functions page. Now the data-types
page introduces arrays early (opening paragraph + STRICT types callout)
and the CREATE TYPE page has a dedicated Array Types section with examples.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds STRUCT and UNION composite types, defined via CREATE TYPE and
usable as column types in STRICT tables.
- STRUCT stores named, typed fields as a SQLite record blob
- UNION is a tagged union (one-byte tag + variant value)
- New functions: struct_pack, struct_extract, union_value, union_tag,
union_extract
- Dot notation sugar: col.variant.field desugars to nested extract calls
- Type checking enforces schema on INSERT
- Expression indexes on STRUCT/UNION functions are supported
- Partial index WHERE predicates using custom type functions work
correctly across INSERT, UPDATE, and UPSERT (uses emit_dml_expr_index_value
to preserve type context)
Gated behind --experimental-custom-types.
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>