Repository navigation
The SDK's constraint/generated-column handling disagreed with the DuckDB
extension in both directions: tables with unattested non-null fields
failed to serve, records the extension refuses were served, 0.47 stored
catalog logs broke every listing, and clients could neither offer the
read profiles nor decode records.
- Nullability is relaxed, not policed: serving sets each field's Arrow
nullability from the NOT_NULL/PRIMARY_KEY records (ordinary STRUCTs
recursed, row id untouched). Newconstraints::served_columnsand
catalog::served_table_columns; every serve path goes through it. validate_table_constraints(schema_path, table, columns, records)
now mirrors DecodeNativeConstraints: owner schema/table, one-component
schema paths, duplicate ids and case-insensitive labels, one PRIMARY
KEY, path resolution (nested only for NOT_NULL), same-schema
MATCH SIMPLE NO_ACTION/RESTRICT foreign keys, size bounds, and the
numeric-comparison CHECK grammar.validate_foreign_key_targets,
CatSchema::validate_foreign_keysandCatalogModel::validate_tables
check FK targets across a schema; listings and table_get run it.- Generated columns follow ReadNativeColumnGenerated: nullable, Boolean/
Int8..Int64/Utf8, default context, bounded grammar and operand types.
Legacygenerated_expressionmetadata is translated to the canonical
pair when serving a catalog table instead of being rejected. - StoredCatalog replays 0.47 logs carrying not_null/unique/check/
primary_key by dropping the facts with a warning; constrained CREATE
TABLE stays refused (no write path to enforce it) with an exact error. - The record codec and capability helpers move to
vgi_protocol::constraints(re-exported byvgi::constraintsand
vgi_client::constraints); newconstraint_read_agreementfor
custom catalogs. vgi-client:AttachOptions.catalog_capabilities
(default offers the constraint read profiles),table_constraints,
AttachedCatalog::selected_capabilities. - Legacy CatTable constraint fields,
serialize_foreign_keyand
build_macro_arguments_schemaare #[deprecated]; stale docs for
CatMacro::parameter_docs and the vgi.v2-beside-v3 claim fixed.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com