Module schema

Module schema 

Source
Expand description

Schema definitions for QAIL validation.

Provides types for representing database schemas and loading them from JSON/TOML.

§Example

use qail_core::schema::Schema;

let json = r#"{
    "tables": [{
        "name": "users",
        "columns": [
            { "name": "id", "typ": "uuid", "nullable": false },
            { "name": "email", "typ": "varchar", "nullable": false }
        ]
    }]
}"#;

let schema: Schema = serde_json::from_str(json).unwrap();
let validator = schema.to_validator();

Structs§

ColumnDef
Schema
TableDef