Skip to main content

sntl_schema/
lib.rs

1//! Schema analysis and cache library shared by `sntl-macros` and `sntl-cli`.
2//!
3//! Modules:
4//! - [`config`]: parse `sentinel.toml` + env overrides.
5//! - [`schema`]: typed model of `schema.toml` (tables, columns, enums, composites).
6//! - [`cache`]: read/write `.sentinel/` directory.
7//! - [`normalize`]: deterministic SQL normalization + hashing.
8//! - [`parser`]: sqlparser-rs wrapper.
9//! - [`scope`]: FROM/JOIN scope resolution and column origins.
10//! - [`nullable`]: nullability inference engine.
11//! - [`resolve`]: high-level orchestrator turning SQL into validated metadata.
12//! - [`introspect`]: online-only helpers for talking to a live PostgreSQL.
13//! - [`error`]: typed errors.
14
15pub mod cache;
16pub mod config;
17pub mod error;
18pub mod normalize;
19pub mod nullable;
20pub mod parser;
21pub mod resolve;
22pub mod schema;
23pub mod scope;
24
25#[cfg(feature = "online")]
26pub mod introspect;
27
28pub use error::{Error, Result};