Skip to main content

Module traits

Module traits 

Source
Expand description

Traits for PostgreSQL tables, columns, enums and custom column types, and for decoding values and driver rows.

The macros implement most of these: #[PostgresTable] implements PostgresTable and PostgresColumn, and #[derive(PostgresEnum)] implements DrizzlePostgresColumn (and PostgresEnum for native enums). Implement FromPostgresValue yourself to decode a custom type.

Traitsยง

DrizzlePostgresColumn
A custom Rust type that can be used as a PostgreSQL column type (variant without a driver feature).
DrizzleRowByIndex
A driver row whose columns can be read by position.
DrizzleRowByName
A driver row whose columns can be read by name.
FromPostgresValue
A Rust type that can be built from a PostgresValue.
PostgresColumn
A column of a PostgreSQL table, with its auto-increment settings.
PostgresEnum
Object-safe view of a Rust enum stored as a PostgreSQL enum value.
PostgresTable
A PostgreSQL table. Implemented by #[PostgresTable].