Expand description
PostgreSQL connection implementation.
This module implements the PostgreSQL wire protocol connection, including connection establishment, authentication, and state management.
§Console Integration
When the console feature is enabled, the connection can report progress
during connection establishment. Use the ConsoleAware trait to attach
a console for rich output.
ⓘ
use sqlmodel_postgres::{PgConfig, PgConnection};
use sqlmodel_console::{SqlModelConsole, ConsoleAware};
use std::sync::Arc;
let console = Arc::new(SqlModelConsole::new());
let mut conn = PgConnection::connect(config)?;
conn.set_console(Some(console));Structs§
- PgConnection
- PostgreSQL connection.
Enums§
- Connection
State - Connection state in the PostgreSQL protocol state machine.
- Transaction
Status State - Transaction status from the server.