prax-postgres 0.11.0

PostgreSQL driver for the Prax ORM with connection pooling
Documentation
[package]
name = "prax-postgres"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
description = "PostgreSQL driver for the Prax ORM with connection pooling"
documentation = "https://docs.rs/prax-postgres"
keywords = ["orm", "postgres", "postgresql", "database", "async"]
categories = ["database", "asynchronous"]

[dependencies]
# Internal crates
prax-query = { workspace = true }

# Async runtime
tokio = { workspace = true }
futures = { workspace = true }

# PostgreSQL driver
tokio-postgres = { version = "0.7", features = ["with-serde_json-1", "with-chrono-0_4", "with-uuid-1"] }
deadpool-postgres = { version = "0.14", features = ["rt_tokio_1"] }
postgres-types = { version = "0.2", features = ["derive"] }
# bytes::BytesMut is the output buffer tokio-postgres' ToSql trait writes into.
bytes = "1"

# Serialization
serde = { workspace = true }
serde_json = { workspace = true }

# Error handling
thiserror = { workspace = true }

# Date/Time
chrono = { version = "0.4", features = ["serde"] }

# UUID
uuid = { version = "1.0", features = ["v4", "serde"] }

# Decimal
# `db-tokio-postgres` adds the `FromSql`/`ToSql` impls for NUMERIC <-> Decimal
# (tokio-postgres 0.7 ships no `with-rust_decimal-*` feature gate of its own),
# which `decode_aggregate_cell` needs to read AVG()/NUMERIC aggregate cells.
rust_decimal = { workspace = true, features = ["db-tokio-postgres"] }

# Tracing
tracing = "0.1"

# URL parsing
url = "2.5"

# LRU cache for prepared statements
lru = { workspace = true }

# TLS support via rustls (matches the workspace TLS stack: sqlx, tiberius,
# and mysql_async all use rustls). `postgres_rustls` provides the
# `MakeTlsConnect` impl deadpool-postgres needs; `webpki-roots` supplies the
# Mozilla root store certificates are verified against.
# Pinned: 0.1.6 requires rustc > 1.89 (workspace MSRV); re-verify on MSRV bump.
postgres_rustls = { version = "=0.1.5", optional = true }
tokio-rustls = { version = "0.26", optional = true }
rustls = { version = "0.23", optional = true }
webpki-roots = { version = "0.26", optional = true }

[dev-dependencies]
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
pretty_assertions = { workspace = true }
# E2E tests use these for type round-trip assertions.
uuid = { workspace = true }
serde_json = { workspace = true }

[features]
default = ["tls"]
# `tls` enables encrypted connections (sslmode=require/verify-*). Disable it
# for a minimal dependency tree; TLS-requiring modes then fail at pool build
# time with a clear error instead of silently downgrading.
tls = ["dep:postgres_rustls", "dep:tokio-rustls", "dep:rustls", "dep:webpki-roots"]