audb 0.1.11

AuDB - Compile-time database application framework with gold files
Documentation
//! Project model types
//!
//! This module contains the internal representation of an AuDB project,
//! combining all gold files into a unified model for code generation.
//!
//! ## Model Architecture
//!
//! The model layer converts parsed AST (from the parser module) into a
//! domain-specific representation optimized for code generation:
//!
//! - **Project**: Top-level container for all project metadata and resources
//! - **Schema**: Type-safe schema definitions with Field types
//! - **Query**: Database queries with typed parameters and return values
//! - **Endpoint**: REST API endpoint specifications
//! - **Dependencies**: Cargo dependency management
//!
//! ## Conversion Pipeline
//!
//! ```ignore
//! GoldFile (AST) → Project::from_gold_files() → Project (Model)
//! ```
//!
//! The conversion process:
//! 1. Parse multiple gold files into AST
//! 2. Validate AST structure
//! 3. Convert AST blocks to model types
//! 4. Merge resources from multiple files
//! 5. Build unified project model
//!
//! ## Usage
//!
//! ```ignore
//! use audb::model::Project;
//! use audb::parser::GoldParser;
//!
//! // Parse gold files
//! let file1 = GoldParser::parse_file("schemas.au")?;
//! let file2 = GoldParser::parse_file("queries.au")?;
//!
//! // Convert to project model
//! let project = Project::from_gold_files(vec![file1, file2])?;
//!
//! // Query the model
//! let user_schema = project.get_schema("User").unwrap();
//! let get_user_query = project.get_query("get_user").unwrap();
//! ```

pub mod dependency;
pub mod project;
pub mod query;

// Re-export key types for convenience
pub use dependency::{DependencyManager, DependencySpec, GitRef, VersionRequirement};
pub use project::{
    AuthRequirement, DatabaseConfig, DocsConfig, Endpoint, Project, ProjectMetadata,
    ScaffoldConfig, ScaffoldItem, ServerConfig, Test, TestStep,
};
pub use query::{Parameter, Query, QueryLanguage};

// Re-export for backward compatibility
pub use DatabaseConfig as Config;