rustling_data/
lib.rs

1//! # rustling-data 🦀
2//!
3//! Core runtime layer for the **Rustling ORM** system.
4//! Provides traits, error types, and database drivers used by the derive macros in
5//! [`rustling-derive`](https://crates.io/crates/rustling-derive).
6//!
7//! ## Features
8//!
9//! - `mongo`: MongoDB driver
10//! - `postgres`: PostgreSQL driver
11//!
12//! ## Example
13//! ```rust,no_run
14//! use rustling_data::api::CrudRepository;
15//! use rustling_derive::MongoRepository;
16//! ```
17//!
18//! See the crate README for complete examples.
19
20#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-512x512.png")]
21
22pub mod api;
23pub mod drivers;
24
25#[cfg(feature = "postgres")]
26pub use drivers::postgres::PostgresDriver;
27#[cfg(feature = "postgres")]
28pub use sqlx::FromRow;
29#[cfg(feature = "postgres")]
30pub use sqlx::PgPool;
31#[cfg(feature = "postgres")]
32pub use sqlx::postgres::PgPoolOptions;
33
34#[cfg(feature = "mongo")]
35pub use drivers::mongo::MongoDriver;
36#[cfg(feature = "mongo")]
37pub use mongodb;
38#[cfg(feature = "mongo")]
39pub use mongodb::options::ClientOptions;
40#[cfg(feature = "mongo")]
41pub use mongodb::{Client, bson};