audb 0.1.11

AuDB - Compile-time database application framework with gold files
Documentation
//! Schema system for AuDB
//!
//! This module provides schema definitions supporting multiple formats
//! (native, JSON Schema, TypeScript, Rust).
//!
//! ## Schema Formats
//!
//! AuDB supports multiple schema definition formats:
//!
//! - **Native**: Rust-like syntax in gold files (default)
//! - **JSON Schema**: Standard JSON Schema format (embedded in gold files)
//! - **TypeScript**: TypeScript interface definitions
//! - **Rust**: Direct Rust struct definitions
//!
//! ## Architecture
//!
//! All schema formats are parsed into a unified internal representation
//! (`Schema` with `Field` and `Type`). This allows:
//!
//! - Format-agnostic code generation
//! - Cross-format validation
//! - Consistent type system
//!
//! ## Parsing Pipeline
//!
//! ```ignore
//! Embedded Format → Parser → Schema (unified) → Code Generation
//! ```
//!
//! ## Usage
//!
//! ```ignore
//! use audb::schema::{Schema, SchemaFormat, parsers};
//!
//! // Parse JSON Schema
//! let json = r#"{"type": "object", "properties": {...}}"#;
//! let schema = parsers::parse_json_schema("User", json)?;
//!
//! // Parse TypeScript
//! let ts = "interface User { id: string; name: string; }";
//! let schema = parsers::parse_typescript("User", ts)?;
//! ```

pub mod parsers;
pub mod types;

// Re-export key types for convenience
pub use types::{
    EmbeddingConfig, EmbeddingParadigm, Field, FieldAttribute, Schema, SchemaFormat, Type,
};

// Re-export parsers
pub use parsers::{parse_json_schema, parse_typescript};