Skip to main content

Crate fletch_orm

Crate fletch_orm 

Source
Expand description

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.

Re-exports§

pub use column::Column;
pub use column::ColumnType;
pub use entity::Entity;
pub use error::FletchError;
pub use pool::Pool;
pub use pool::PoolBuilder;
pub use pool::PoolConfig;
pub use pool::Transaction;
pub use value::Value;
pub use ops::delete;
pub use ops::fetch_all;
pub use ops::find_all;
pub use ops::find_by_id;
pub use ops::insert;
pub use ops::update;
pub use built_query::BuiltQuery;
pub use dialect::Dialect;
pub use dialect::MySqlDialect;
pub use dialect::PostgresDialect;
pub use dialect::SqliteDialect;
pub use filter::Filter;
pub use filter::Op;
pub use query_builder::Order;
pub use query_builder::QueryBuilder;
pub use sqlx;

Modules§

built_query
A built SQL statement with its SQL string and collected bind values.
column
Column metadata for schema representation.
connection
Connection trait for abstracting over Pool and Transaction.
dialect
SQL dialect abstraction for multi-database support.
entity
Entity trait for database-backed types.
error
Error types for fletch database operations.
filter
Filter types for building WHERE clauses.
ops
Dialect-generic CRUD operations.
pool
Connection pool wrapper around sqlx::Pool.
query_builder
Type-safe SQL query builder with dialect support.
value
Dynamic value type for bind parameters.

Traits§

Executor
Re-export of the SQLx Executor trait.
FromRow
A record that can be built from a row returned by the database.

Derive Macros§

Entity
Derive macro to generate fletch_orm::Entity trait implementation.