Skip to main content

drizzle_sqlite/
lib.rs

1//! `SQLite` dialect for drizzle-rs.
2//!
3//! This crate holds the `SQLite` parts of drizzle-rs: the typed query
4//! builder ([`builder::QueryBuilder`]), values ([`values::SQLiteValue`]),
5//! JSON helpers ([`expr`]), PRAGMA statements ([`pragma`]), and the traits
6//! that `#[SQLiteTable]` and friends implement. Most applications use it
7//! through the `drizzle` crate (`drizzle::sqlite`), which adds the drivers
8//! (`rusqlite`, `libsql`, `turso`).
9
10#![cfg_attr(not(feature = "std"), no_std)]
11
12#[cfg(not(feature = "std"))]
13extern crate alloc;
14
15#[allow(unused_imports)]
16pub(crate) mod prelude {
17    #[cfg(feature = "std")]
18    pub use std::{
19        borrow::{Cow, ToOwned},
20        boxed::Box,
21        format,
22        rc::Rc,
23        string::{String, ToString},
24        sync::Arc,
25        vec,
26        vec::Vec,
27    };
28
29    #[cfg(not(feature = "std"))]
30    pub use alloc::{
31        borrow::{Cow, ToOwned},
32        boxed::Box,
33        format,
34        rc::Rc,
35        string::{String, ToString},
36        sync::Arc,
37        vec,
38        vec::Vec,
39    };
40}
41
42pub mod attrs;
43pub mod builder;
44pub mod common;
45pub mod connection;
46pub mod expr;
47pub mod helpers;
48pub mod pragma;
49pub mod traits;
50/// SQL type markers for `SQLite` columns (`Integer`, `Text`, `Blob`, `Real`,
51/// `Numeric`, `Any`), re-exported from `drizzle-types`.
52pub mod types {
53    pub use drizzle_types::sqlite::types::*;
54}
55pub mod values;
56
57pub use connection::{SQLiteTransactionType, TransactionConfig};
58pub use drizzle_core::ParamBind;