Skip to main content

Crate corium_pgwire

Crate corium_pgwire 

Source
Expand description

A PostgreSQL wire-protocol front end for Corium SQL.

serve accepts PostgreSQL client connections. Reads run through corium_sql::SqlSession against an immutable corium_db::Db value obtained from a DbCatalog. Supported DML is planned into ordinary Corium transaction forms and committed through the catalog.

One server exposes every database the catalog offers (subject to the catalog’s own whitelist). A connection selects its database with the standard startup database parameter and can switch at any time with USE <database>; SHOW DATABASES lists what is available. The catalog is expected to open and cache databases lazily and share them across connections.

Both simple and extended query sub-protocols are supported, including typed bound inputs and text or binary results. Mutations are autocommit-only: explicit transaction blocks allow reads but reject writes until atomic multi-statement transactions are implemented.

Structs§

CatalogTxResult
Result of a catalog transaction, synchronized through its committed basis.
PgWireConfig
Server-wide configuration for the PostgreSQL front end.

Enums§

CatalogError
A database the catalog cannot hand back.

Traits§

DbCatalog
Supplies the databases the server exposes.

Functions§

serve
Serves the PostgreSQL wire protocol until shutdown resolves.