guardian-db 0.19.0

High-performance, local-first decentralized database built on Rust and Iroh
Documentation
//! # guardian-relational
//!
//! The relational foundation for GuardianDB's PostgreSQL compatibility layer.
//!
//! This crate is deliberately free of any dependency on GuardianDB's networking /
//! iroh stack so that the relational core compiles and tests quickly and can be
//! reused by embedders. It provides:
//!
//! * [`SqlType`] — the PostgreSQL-compatible type system with OIDs.
//! * [`SqlValue`] — the runtime value model with canonical JSON encoding, wire
//!   text I/O, three-valued comparison and casts.
//! * [`Catalog`] — schemas, tables, columns, constraints, indexes, sequences and
//!   views, fully serializable for persistence and transaction snapshots.
//! * [`RelationalStorage`] — the document-collection persistence boundary, with an
//!   in-memory implementation ([`MemoryStorage`]).
//! * Secondary index structures with composite keys and uniqueness enforcement.
//! * [`RelError`] — error types carrying PostgreSQL SQLSTATE codes.

pub mod catalog;
pub mod error;
pub mod fts;
pub mod index;
pub mod storage;
pub mod types;
pub mod value;

pub use catalog::{
    Catalog, CheckConstraint, Column, DropFunctionByName, FIRST_USER_OID, ForeignKey,
    FunctionArgDef, FunctionDef, FunctionLanguage, FunctionVolatility, Index, Policy, PolicyCmd,
    PrimaryKey, QualifiedName, ReferentialAction, Schema, Sequence, Table, TriggerDef,
    TriggerEventDef, TriggerLevel, TriggerTiming, UniqueConstraint, View,
};
pub use error::{RelError, Result};
pub use index::{SecondaryIndex, composite_key, ordered_key};
pub use storage::{CATALOG_COLLECTION, MemoryStorage, RelationalStorage};
pub use types::SqlType;
pub use value::SqlValue;