Skip to main content

larust_orm/
lib.rs

1//! `QueryBuilder` + a process-wide connection pool over `sqlx` (SQLite or
2//! MySQL, chosen at runtime by `DATABASE_URL` - see `pool::Backend`), plus
3//! a minimal migration runner. `#[derive(Model)]` (in `larust-macros`)
4//! generates the CRUD methods that use these.
5
6mod config;
7mod factory;
8mod introspect;
9mod migrate;
10mod model;
11mod pool;
12mod query_builder;
13mod repository;
14
15pub use config::{ConnectionConfig, DatabaseConnections, Driver};
16pub use factory::{Factory, FactoryBuilder};
17pub use introspect::table_names;
18pub use migrate::fresh as migrate_fresh;
19pub use migrate::run as migrate;
20pub use model::Model;
21pub use pool::{
22    backend, connect, ensure_backend, normalize_sqlite_url, placeholder, pool, read_pool,
23    with_pool_override, Backend,
24};
25pub use query_builder::{BindValue, Op, Order, QueryBuilder, SoftDeletes};
26pub use repository::AnyRepository;
27
28pub use sqlx;