Expand description
Compile-time database validation for schema definitions.
Validates a compiled schema against a live database at three levels:
- L1:
sql_sourcerelation exists in the database - L2: Columns and JSON column types match
- L3: JSONB keys exist in sampled rows (best-effort)
Each finding carries a Severity: error-severity drift (a relation that
does not exist, a required field’s key absent from every sampled row) fails
compile --database unless --allow-drift is passed (#384); warn-severity
findings are always advisory.
Structs§
- Database
Validation Report - Report containing all database validation warnings and discovered metadata.
Enums§
- AnyIntrospector
- Enum dispatch for database introspectors.
- Database
Warning - A single database validation warning.
- Inject
Miss - Why a relation cannot provide a query filter (#1382, #1394).
- Query
Filter - A query filter the runtime lowers onto the relation: what the author declared.
Functions§
- create_
introspector - Create an introspector from a database URL.
- find_
unbacked_ sources - Find every declared
sql_sourcethat is not backed by a live database object, over the sharedsql_source_probeswork-list (#487). - refuse_
removed_ engine_ url - Refuse a database URL that targets an engine whose support was removed (#374).
- validate_
schema_ against_ database - Validate a compiled schema against a live database.