prax-postgres

Crates.ioprax-postgres
lib.rsprax-postgres
version0.5.0
created_at2025-12-21 16:28:26.083059+00
updated_at2026-01-07 18:33:48.288862+00
descriptionPostgreSQL driver for the Prax ORM with connection pooling
homepage
repositoryhttps://github.com/pegasusheavy/prax-orm
max_upload_size
id1998250
size101,929
Joseph R. Quinn (quinnjr)

documentation

https://docs.rs/prax-postgres

README

prax-postgres

PostgreSQL query engine for Prax ORM.

Overview

prax-postgres provides an async PostgreSQL backend using tokio-postgres with deadpool-postgres connection pooling.

Features

  • Async query execution with Tokio
  • Connection pooling via deadpool-postgres
  • Transaction support with savepoints
  • Prepared statement caching
  • SSL/TLS support

Usage

use prax_postgres::PostgresEngine;

let engine = PostgresEngine::new("postgresql://user:pass@localhost/db").await?;

// Execute queries through Prax client
let client = PraxClient::with_engine(engine);
let users = client.user().find_many().exec().await?;

Configuration

use prax_query::connection::PoolConfig;

let config = PoolConfig::new()
    .max_connections(20)
    .min_connections(5)
    .idle_timeout(Duration::from_secs(300));

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Commit count: 0

cargo fmt