Skip to main content

rusql_alchemy/db/
mod.rs

1pub mod model;
2pub mod query;
3pub mod types;
4
5#[cfg(not(feature = "postgres"))]
6pub const PLACEHOLDER: &str = "?";
7
8#[cfg(feature = "postgres")]
9pub const PLACEHOLDER: &str = "$";
10
11#[cfg(not(feature = "turso"))]
12/// A type alias for the database connection pool.
13///
14/// When the `turso` feature is not enabled, this is a `sqlx::Pool<sqlx::Any>`.
15pub type Connection = sqlx::Pool<sqlx::Any>;
16
17#[cfg(feature = "turso")]
18/// A type alias for the database connection.
19///
20/// When the `turso` feature is enabled, this is a `libsql::Connection`.
21pub type Connection = libsql::Connection;