Skip to main content

Crate pgorm_derive

Crate pgorm_derive 

Source
Expand description

Derive macros for pgorm

Provides #[derive(FromRow)] and #[derive(Model)] macros.

Derive Macrosยง

FromRow
Derive FromRow trait for a struct.
InsertModel
Derive InsertModel helpers for inserting into a table.
Model
Derive Model metadata for a struct.
PgComposite
Derive PgComposite helpers to map a Rust struct to a PostgreSQL composite type.
PgEnum
Derive PgEnum helpers to map a Rust enum to a PostgreSQL ENUM type.
QueryParams
Derive QueryParams helpers for building dynamic queries from a params struct.
UpdateModel
Derive UpdateModel helpers for updating a table (patch-style).
ViewModel
Derive ViewModel metadata for a struct.