sql_middleware/typed/any/
mod.rs

1//! Backend-neutral `AnyIdle` and `AnyTx` enum wrappers.
2
3#[cfg(feature = "postgres")]
4use crate::postgres::typed::{Idle as PgIdle, InTx as PgInTx, PgConnection};
5#[cfg(feature = "sqlite")]
6use crate::sqlite::typed::{Idle as SqIdle, InTx as SqInTx, SqliteTypedConnection};
7#[cfg(feature = "turso")]
8use crate::turso::typed::{Idle as TuIdle, InTx as TuInTx, TursoConnection};
9
10mod ops;
11mod queryable;
12
13/// Backend-neutral idle wrapper.
14pub enum AnyIdle {
15    #[cfg(feature = "postgres")]
16    Postgres(PgConnection<PgIdle>),
17    #[cfg(feature = "sqlite")]
18    Sqlite(SqliteTypedConnection<SqIdle>),
19    #[cfg(feature = "turso")]
20    Turso(TursoConnection<TuIdle>),
21}
22
23/// Backend-neutral tx wrapper.
24pub enum AnyTx {
25    #[cfg(feature = "postgres")]
26    Postgres(PgConnection<PgInTx>),
27    #[cfg(feature = "sqlite")]
28    Sqlite(SqliteTypedConnection<SqInTx>),
29    #[cfg(feature = "turso")]
30    Turso(TursoConnection<TuInTx>),
31}