cast/lib.rs
1//! Cast — Eloquent-shaped ORM for Anvil. Facade crate.
2//!
3//! ```ignore
4//! use cast::{Model, Pool};
5//!
6//! #[derive(cast::Model)]
7//! #[table("users")]
8//! pub struct User {
9//! pub id: i64,
10//! pub name: String,
11//! pub email: String,
12//! }
13//!
14//! let users = User::query()
15//! .where_eq(User::columns().email(), "x@y.com".to_string())
16//! .get(&pool).await?;
17//! ```
18
19pub use cast_core::*;
20pub use cast_derive::Model;
21
22// `#[macro_export]` macros land at the defining crate's root, not in the
23// module tree that `cast_core::*` re-exports — so they need explicit re-export
24// for `cast::migration!` / `anvilforge::migration!` to resolve.
25pub use cast_core::migration;
26
27// Re-export sqlx and sea-query so downstream crates can rely on Cast's pinned versions.
28pub use sea_query;
29pub use sqlx;