You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the #232 layering discussion (Kern = declared nouns). Today the constraint surface is split: Index covers UNIQUE KEY, Relationship covers FOREIGN KEY, and a standalone CHECK constraint is not modeled at all. A unified Constraint object (or a broadened story across Index/Relationship) would let a developer declare table constraints uniformly - which puts it on the Kern axis.
Sketch (not committing to a shape)
A declared constraint carrying a kind (CHECK / UNIQUE / FOREIGN KEY), its columns/expression, and a name, that emits its DDL fragment - much like Index::get_create_string() / Relationship::get_create_string().
Decide the boundary: does this replace the UNIQUE-via-Index and FK-via-Relationship paths, or only addCHECK alongside them? (Likely add CHECK; keep Index / Relationship as-is to avoid churn - reconcile in design.)
Background
From the #232 layering discussion (Kern = declared nouns). Today the constraint surface is split:
IndexcoversUNIQUE KEY,RelationshipcoversFOREIGN KEY, and a standaloneCHECKconstraint is not modeled at all. A unifiedConstraintobject (or a broadened story acrossIndex/Relationship) would let a developer declare table constraints uniformly - which puts it on the Kern axis.Sketch (not committing to a shape)
CHECK/UNIQUE/FOREIGN KEY), its columns/expression, and a name, that emits its DDL fragment - much likeIndex::get_create_string()/Relationship::get_create_string().Indexand FK-via-Relationshippaths, or only addCHECKalongside them? (Likely addCHECK; keepIndex/Relationshipas-is to avoid churn - reconcile in design.)CHECKenforcement differs (older MySQL parsed-but-ignored it; MariaDB and MySQL 8.0.16+ enforce; SQLite supports it) - validate before relying, do not assume.Status
YAGNI until a feature needs
CHECK; filed to capture the axis + the current split. Related: #232, #220, and the FK work in #205 / #193.