#row #postgresql #macro #sync #create #write #synchronous

macro pg_sgr_from_row

Write asynchronous code, and synca will create a synchronous version

1 unstable release

0.1.0 Jan 14, 2024

#57 in #row


Used in pg_sgr

MIT/Apache

12KB
196 lines

pg_sgr_from_row

Docs

docs.rs


lib.rs:

FromRow

Part of pg_sgr: macros for deserializing rust data structures from postgres rows.

Install

Sync

cargo add pg_sgr --features sync,from_row

Tokio

cargo add pg_sgr --features tokio,from_row

Macros

Crate contains 3 derive macros:

  • FromRow - for deserializing rust data structures from &postgres::Row or &tokio_postgres::Row
  • FromRows - for deserializing rust data structures from Vec<postgres::Row> or Vec<tokio_postgres::Row>
  • FromJson - for deserializing rust data structures from JSON & JSONB columns

Dependencies

~315–770KB
~18K SLoC