pgevolve_core/lib.rs
1//! `pgevolve-core` — the declarative-schema-management engine.
2//!
3//! This crate is I/O-free: it accepts source SQL bytes and a `CatalogQuerier`
4//! implementation from callers, and returns IR, diffs, and plans as data.
5//! See the workspace `docs/superpowers/specs/` for the design.
6#![warn(missing_docs)]
7#![deny(unsafe_code)]
8// ParseError + CatalogError carry rich SourceLocation / QualifiedName context
9// in many variants, which grows the enum past clippy's 128-byte
10// `result_large_err` threshold. Boxing every error site would obscure the
11// error-handling code with `Box<…>::new(…)` noise without changing the
12// observable behavior — error paths are off the hot path. Allow crate-
13// wide rather than scattering `#![allow]` annotations across every parse /
14// catalog file.
15#![allow(clippy::result_large_err)]
16
17pub mod catalog;
18pub mod diff;
19pub mod error;
20pub mod identifier;
21pub mod ir;
22pub mod lint;
23pub mod parse;
24pub mod plan;
25pub mod render;
26
27pub use crate::parse::normalize_body::{BodyError, NormalizedBody};
28
29/// Crate version, exposed for embedding in plan manifests.
30pub const VERSION: &str = env!("CARGO_PKG_VERSION");
31
32#[cfg(test)]
33mod tests {
34 use super::*;
35
36 #[test]
37 fn version_is_nonempty() {
38 assert!(!VERSION.is_empty());
39 }
40}