#postgresql #macro-derive #json #derive #macro

macro postgres-json-derive

Derive macro for implementing ToSql and FromSql for a struct

1 unstable release

0.1.0 Jun 7, 2023

#1828 in Procedural macros

MIT license

4KB

postgres-json-derive

Postgres derive based on this issue

Usage

use postgres_json_derive::{ToSqlJson, FromSqlJson};

#[derive(ToSqlJson, FromSqlJson)]
struct Horizon {
    zero: String,
    dawn: i32,
}

Dependencies

~3.5–5MB
~112K SLoC