razeri-plugin-contract 0.1.0

The dialect contract Razeri plugins are written against — rendering traits, data types, platform identity
Documentation
// Copyright (C) 2026 Gabriel Shea <gshea@ideapivot.com> - All Rights Reserved

#![warn(missing_docs)]

//! # razeri-plugin-contract
//!
//! **The contract a Razeri dialect plugin is written against.**
//!
//! This crate and `razeri-plugin-api` are the two open crates in Razeri's
//! workspace. Everything a plugin author needs in order to *describe* and
//! *render* a database platform lives here; nothing else does. It depends on
//! `serde` and on nothing else at all, which is what lets a plugin be built,
//! published and consumed outside this repository.
//!
//! ## What is in here
//!
//! **The rendering hierarchy** — ten traits, layered so that a new dialect
//! implements four required methods and inherits ANSI-standard behaviour for
//! the rest:
//!
//! 1. [`SqlRenderer`] — core SQL rendering (the four required methods)
//! 2. [`ExpressionRenderer`] — expressions, with ANSI defaults
//! 3. [`DdlRenderer`] — DDL, with ANSI defaults
//! 4. [`DmlRenderer`] — DML, with ANSI defaults
//! 5. [`ProcedureRenderer`] — stored procedures and functions
//! 6. [`FormulaRenderer`] — formulas, with ANSI defaults
//! 7. [`TaskRenderer`] — scheduled tasks
//! 8. [`ReplicationRenderer`] — change data capture
//! 9. [`StorageRenderer`] — partitioning, compression and index strategy
//! 10. [`DialectCapabilities`] — what the platform's SQL can and cannot do
//!
//! **The vocabulary those traits speak**: [`DataType`] and [`DataTypeRef`], the
//! [`storage_strategy::StoragePlan`] a [`StorageRenderer`] translates, the
//! [`StoragePlatform`] a storage plugin names, and [`DialectFamily`], the
//! platform's own identity.
//!
//! **The decisions a dialect states rather than a core crate deciding for it**,
//! starting with [`SidSpelling`] — how this engine spells a surrogate key —
//! and continuing with [`ProcedureForm`] and [`ScalarFunctionForm`], the
//! routine grammars it speaks, and [`MergeShape`], how it upserts.
//!
//! ## What is deliberately not in here
//!
//! Razeri's design model, its surrogate-key *derivation*, and every renderer
//! that produces Razeri's own output. A plugin says what its engine spells;
//! Razeri composes. That division is why one contract crate can be open while
//! the product is not.

pub mod agnostic;
pub mod capabilities;
pub mod constraint_enforcement;
pub mod data_type;
pub mod dialect_family;
pub mod formula_renderer;
pub mod merge_shape;
pub mod renderer;
pub mod replication;
pub mod routine_form;
pub mod sid_spelling;
pub mod storage_platform;
pub mod storage_renderer;
pub mod storage_strategy;
pub mod task_renderer;

pub use agnostic::*;
pub use capabilities::*;
pub use constraint_enforcement::*;
pub use data_type::{DataType, DataTypeRef};
pub use dialect_family::DialectFamily;
pub use formula_renderer::*;
pub use merge_shape::*;
pub use renderer::*;
pub use replication::*;
pub use routine_form::*;
pub use sid_spelling::*;
pub use storage_platform::StoragePlatform;
pub use storage_renderer::*;
pub use task_renderer::*;