Rust

The PostgreSQL frontend/backend protocol, as libpq's PQexec speaks it.

Wire is one server connection: it authenticates (trust, cleartext, MD5 or SCRAM-SHA-256), then runs statements with the simple query protocol, keeping the transaction status every ReadyForQuery reports. Statements are bytes, sent as-is up to their first NUL (a C string, as libpq sends them), and results keep the bytes the server sent, with the type of each column, so the adapter can read rows exactly as PDO's pgsql driver does.

Contents

use utopia_database::adapter::postgres::wire::Column;
Rust
pub struct Column

A column of a result: its name and type OID.

use utopia_database::adapter::postgres::wire::Config;
Rust
pub struct Config

Where and as whom to connect.

use utopia_database::adapter::postgres::wire::Outcome;
Rust
pub struct Outcome

One result (PGresult): the last of a query string, as PQexec keeps.

use utopia_database::adapter::postgres::wire::Wire;
Rust
pub struct Wire

A server connection.

use utopia_database::adapter::postgres::wire::Status;
Rust
pub enum Status

What PQresultStatus() reports for a result.

use utopia_database::adapter::postgres::wire::TxStatus;
Rust
pub enum TxStatus

PQtransactionStatus().