Expand description
§omnia-postgres
PostgreSQL backend for the Omnia WASI runtime, implementing the wasi-sql interface.
Uses deadpool-postgres connection pooling with optional TLS via rustls. Supports multiple named pools for connecting to several databases from a single runtime.
MSRV: Rust 1.93
§Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
POSTGRES_URL | yes | Default pool connection URI | |
POSTGRES_POOL_SIZE | no | 10 | Default pool size |
POSTGRES_POOLS | no | Comma-separated extra pool names | |
POSTGRES_URL__<NAME> | per pool | URI for named pool | |
POSTGRES_POOL_SIZE__<NAME> | no | inherited | Pool size for named pool |
§Usage
ⓘ
use omnia::Backend;
use omnia_postgres::Client;
let options = omnia_postgres::ConnectOptions::from_env()?;
let client = Client::connect_with(options).await?;§License
MIT OR Apache-2.0
Structs§
- Client
- Postgres client
- Connect
Options - Connection options for the
PostgreSQLbackend. - Pool
Entry - A named connection pool entry.