fletch-orm 1.0.0

Lightweight database toolkit built on SQLx
Documentation
//! Fletch — a lightweight database toolkit built on SQLx.
//!
//! Fletch provides a thin, type-safe layer over SQLx with entity metadata,
//! dialect-generic CRUD operations, query building with dialect support for
//! SQLite, PostgreSQL, and MySQL, connection pooling, and transaction management.
//!
//! **API tiers:** Root re-exports cover the common path (entities, pools,
//! query builder, dialects, CRUD). Submodules such as [`connection`] and
//! [`query_builder`] are for advanced usage and query authoring. Free functions
//! in [`ops`] accept any [`Executor`] for custom execution contexts.

mod bind;
pub mod built_query;
pub mod column;
pub mod connection;
pub mod dialect;
pub mod entity;
pub mod error;
pub mod filter;
pub mod ops;
pub mod pool;
pub mod query_builder;
pub mod value;

// Re-export core types at the crate root.
pub use column::{Column, ColumnType};
pub use connection::Executor;
pub use entity::Entity;
pub use error::FletchError;
pub use pool::{Pool, PoolBuilder, PoolConfig, Transaction};
pub use value::Value;

// Re-export CRUD free functions.
pub use ops::{delete, fetch_all, find_all, find_by_id, insert, update};

// Re-export query builder types at the crate root.
pub use built_query::BuiltQuery;
pub use dialect::{Dialect, MySqlDialect, PostgresDialect, SqliteDialect};
pub use filter::{Filter, Op};
pub use query_builder::{Order, QueryBuilder};

// Re-export sqlx for row mapping and generated entity code.
pub use sqlx;
pub use sqlx::FromRow;

// Re-export derive macro when macros feature is enabled.
#[cfg(feature = "macros")]
pub use fletch_orm_macros::Entity;