//! `PostgreSQL` support for drizzle-rs
//!
//! This crate provides PostgreSQL-specific types, query builders, and utilities.

#![allow(unexpected_cfgs)]
#![cfg_attr(not(feature = "std"), no_std)]

#[cfg(not(feature = "std"))]
extern crate alloc;

pub(crate) mod prelude {
    #[cfg(feature = "std")]
    pub use std::{
        borrow::Cow,
        boxed::Box,
        format,
        rc::Rc,
        string::{String, ToString},
        sync::Arc,
        vec::Vec,
    };

    #[cfg(not(feature = "std"))]
    pub use alloc::{
        borrow::Cow,
        boxed::Box,
        format,
        rc::Rc,
        string::{String, ToString},
        sync::Arc,
        vec::Vec,
    };
}

pub mod attrs;
#[cfg(feature = "aws-data-api")]
pub mod aws_data_api;
pub mod builder;
pub mod common;
pub mod expr;
pub mod helpers;
pub mod traits;
pub mod types {
    pub use drizzle_types::postgres::types::*;
}
pub mod values;

#[cfg(all(feature = "postgres-sync", not(feature = "tokio-postgres")))]
pub use postgres::Row;
#[cfg(feature = "tokio-postgres")]
pub use tokio_postgres::Row;

#[doc(hidden)]
pub mod driver_types {
    #[cfg(all(
        any(feature = "serde", feature = "query"),
        feature = "postgres-sync",
        not(feature = "tokio-postgres")
    ))]
    pub use postgres::types::Json;
    #[cfg(all(any(feature = "serde", feature = "query"), feature = "tokio-postgres"))]
    pub use tokio_postgres::types::Json;
}

pub use drizzle_core::ParamBind;
