Skip to main content

orbit_orm/
lib.rs

1//! Orbit is an ORM for Rocket.rs apps. It supports MySQL and MariaDB, PostgreSQL and SQLite,
2//! each behind a Cargo feature of the same name. The database is chosen by the URL.
3//!
4//! Orbit uses `sqlx` for the connection pool and the wire protocol, and adds the ORM layer
5//! on top of it.
6
7mod backend;
8#[cfg(feature = "blocking")]
9pub mod blocking;
10mod database;
11mod driver;
12mod error;
13mod migrate;
14mod model;
15mod query;
16pub mod raw;
17mod transaction;
18mod value;
19
20/// Re-exported for the `OrbitModel` derive, so a model does not need its own `sqlx` dependency.
21#[doc(hidden)]
22pub use sqlx as __sqlx;
23
24pub use database::{Database, PoolOptions};
25pub use driver::Driver;
26#[doc(hidden)]
27pub use driver::rows::DriverRows;
28pub use error::Error;
29pub use migrate::{Migration, Migrator, State, Status};
30pub use model::Model;
31#[cfg(feature = "derive")]
32pub use orbit_macros::OrbitModel;
33pub use query::{Direction, Operator, Query};
34pub use transaction::{Executor, Transaction};
35pub use value::Value;