Skip to main content

sea_query_sqlx/
lib.rs

1#![forbid(unsafe_code)]
2
3//! Driver library for using SeaQuery with SQLx
4//!
5//! This library introduces various traits that add methods to the query types from `sea-query`.
6//! For instance, using the [`SqlxBinder`] trait adds a [`SqlxBinder::build_sqlx`] method that
7//! returns the query and a [`SqlxValues`] object, which can be directly passed to `sqlx`'s
8//! [`sqlx::query_with`][1] method.
9//!
10//! [1]: ../sqlx/fn.query_with.html
11
12#[cfg(feature = "sqlx-any")]
13mod sqlx_any;
14#[cfg(feature = "sqlx-mysql")]
15mod sqlx_mysql;
16#[cfg(feature = "sqlx-postgres")]
17mod sqlx_postgres;
18#[cfg(feature = "sqlx-sqlite")]
19mod sqlx_sqlite;
20
21mod values;
22pub use crate::values::SqlxValues;
23
24#[cfg(any(
25    feature = "sqlx-mysql",
26    feature = "sqlx-postgres",
27    feature = "sqlx-sqlite",
28    feature = "sqlx-any"
29))]
30mod sqlx;
31#[cfg(any(
32    feature = "sqlx-mysql",
33    feature = "sqlx-postgres",
34    feature = "sqlx-sqlite",
35    feature = "sqlx-any"
36))]
37pub use crate::sqlx::SqlxBinder;