1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Schema definition and registration system.
//!
//! This module provides types for defining database schemas declaratively in Rust.
//! Schemas are registered at compile time via proc macros and used for:
//!
//! - TypeScript client generation
//! - Migration diffing
//! - Runtime introspection
//!
//! # Key Types
//!
//! - [`TableDef`] - Table schema with fields and indexes
//! - [`FieldDef`] - Column definition with Rust and SQL types
//! - [`FunctionDef`] - Query/mutation signatures for codegen
//! - [`SchemaRegistry`] - Global registry populated by macros
//!
//! # Example
//!
//! ```ignore
//! #[derive(sqlx::FromRow, Serialize, Deserialize)]
//! #[forge::model]
//! pub struct User {
//! pub id: Uuid,
//! pub email: String,
//! pub created_at: DateTime<Utc>,
//! }
//! ```
pub use FieldDef;
pub use ;
pub use ;
pub use ;
pub use ;