Skip to main content

drizzle_postgres/
lib.rs

1//! `PostgreSQL` support for drizzle-rs
2//!
3//! This crate provides PostgreSQL-specific types, query builders, and utilities.
4
5#![allow(unexpected_cfgs)]
6#![cfg_attr(not(feature = "std"), no_std)]
7
8#[cfg(not(feature = "std"))]
9extern crate alloc;
10
11pub(crate) mod prelude {
12    #[cfg(feature = "std")]
13    pub use std::{
14        borrow::Cow,
15        boxed::Box,
16        format,
17        rc::Rc,
18        string::{String, ToString},
19        sync::Arc,
20        vec::Vec,
21    };
22
23    #[cfg(not(feature = "std"))]
24    pub use alloc::{
25        borrow::Cow,
26        boxed::Box,
27        format,
28        rc::Rc,
29        string::{String, ToString},
30        sync::Arc,
31        vec::Vec,
32    };
33}
34
35pub mod attrs;
36#[cfg(feature = "aws-data-api")]
37pub mod aws_data_api;
38pub mod builder;
39pub mod common;
40pub mod expr;
41pub mod helpers;
42pub mod traits;
43pub mod types {
44    pub use drizzle_types::postgres::types::*;
45}
46pub mod values;
47
48#[cfg(all(feature = "postgres-sync", not(feature = "tokio-postgres")))]
49pub use postgres::Row;
50#[cfg(feature = "tokio-postgres")]
51pub use tokio_postgres::Row;
52
53#[doc(hidden)]
54pub mod driver_types {
55    #[cfg(all(
56        any(feature = "serde", feature = "query"),
57        feature = "postgres-sync",
58        not(feature = "tokio-postgres")
59    ))]
60    pub use postgres::types::Json;
61    #[cfg(all(any(feature = "serde", feature = "query"), feature = "tokio-postgres"))]
62    pub use tokio_postgres::types::Json;
63}
64
65pub use drizzle_core::ParamBind;