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;
17pub mod schema;
18mod transaction;
19mod value;
20
21/// Re-exported for the `OrbitModel` derive, so a model does not need its own `sqlx` dependency.
22#[doc(hidden)]
23pub use sqlx as __sqlx;
24
25pub use database::{Database, PoolOptions};
26pub use driver::Driver;
27#[doc(hidden)]
28pub use driver::rows::DriverRows;
29pub use error::Error;
30pub use migrate::{Migration, Migrator, State, Status};
31pub use model::Model;
32#[cfg(feature = "derive")]
33pub use orbit_macros::OrbitModel;
34pub use query::{Direction, Operator, Query};
35pub use transaction::{Executor, Transaction};
36pub use value::Value;