Skip to main content

Crate bsql_core

Crate bsql_core 

Source
Expand description

Runtime support for bsql.

This crate provides the types that bsql::query! generated code depends on: error types, connection pool, and the executor trait.

You should not depend on this crate directly — use [bsql] instead.

Re-exports§

pub use error::BsqlError;
pub use error::BsqlResult;
pub use executor::Executor;
pub use listener::Listener;
pub use listener::Notification;
pub use pool::Pool;
pub use pool::PoolBuilder;
pub use pool::PoolConnection;
pub use pool::PoolStatus;
pub use stream::QueryStream;
pub use transaction::Transaction;
pub use postgres_types as pg_types;

Modules§

error
Error types for bsql.
executor
The Executor trait – the runtime contract between generated code and the pool.
listener
LISTEN/NOTIFY support via a dedicated PostgreSQL connection.
pg
Re-exports from tokio-postgres and postgres-types used by generated code. This avoids requiring users to add tokio-postgres to their dependencies.
pool
Connection pool with fail-fast semantics, PgBouncer detection, singleflight query coalescing, and read/write splitting.
stream
Streaming query results.
transaction
Database transactions with commit/rollback and drop-guard semantics.
types
PostgreSQL OID to Rust type mapping.

Traits§

Stream
Re-export futures_core::Stream so consumers can use QueryStream without adding futures-core as a direct dependency. A stream of values produced asynchronously.