Skip to main content

siderite_backends/
lib.rs

1//! `siderite-backends`: query compilers and database adapters.
2//!
3//! * [`sql`] compiles a [`QueryPlan`](siderite_orm::QueryPlan) into
4//!   parameterised SQL for a [`Dialect`](sql::Dialect). Values are **always**
5//!   bound, never interpolated.
6//! * [`sqlite`] (feature `sqlite`, default) executes plans with SQLx.
7//! * [`postgres`] (feature `postgres`) executes plans with SQLx.
8//!
9//! * [`mysql`] (feature `mysql`) executes plans with SQLx.
10//! * [`mongodb`] (feature `mongodb`) compiles the supported plan subset to
11//!   filters and aggregation pipelines.
12//! * [`redis`] (feature `redis`) is a key/hash/set store
13//!   ([`redis::RedisStore`]), not a QuerySet backend.
14#![forbid(unsafe_code)]
15
16#[cfg(any(feature = "postgres", feature = "mysql"))]
17pub mod connection_init;
18#[cfg(feature = "mongodb")]
19pub mod mongodb;
20#[cfg(feature = "mysql")]
21pub mod mysql;
22#[cfg(feature = "postgres")]
23pub mod postgres;
24#[cfg(feature = "redis")]
25pub mod redis;
26#[cfg(any(feature = "sqlite", feature = "postgres", feature = "mysql"))]
27mod shared;
28pub mod sql;
29#[cfg(feature = "sqlite")]
30pub mod sqlite;