#jsonb #diesel #pg

macro diesel_as_jsonb

Use your structs as Jsonb with diesel and PG

6 releases (2 stable)

1.0.1 Nov 11, 2023
1.0.0 Jun 14, 2022
0.1.3 Dec 7, 2021
0.1.2 Nov 14, 2018

#210 in Procedural macros

Download history 779/week @ 2023-12-01 924/week @ 2023-12-08 1033/week @ 2023-12-15 57/week @ 2023-12-22 366/week @ 2023-12-29 896/week @ 2024-01-05 499/week @ 2024-01-12 747/week @ 2024-01-19 1030/week @ 2024-01-26 852/week @ 2024-02-02 434/week @ 2024-02-09 554/week @ 2024-02-16 467/week @ 2024-02-23 1220/week @ 2024-03-01 1166/week @ 2024-03-08 522/week @ 2024-03-15

3,440 downloads per month

MIT license

4KB

Diesel As JSONB (for PG)

Usage

#[derive(AsJsonb)]]
struct Something {
    thing: String,
}

struct Wrapper {
    things: Vec<Something> // For field type Array<Jsonb>
    thing: Something // For field type Jsonb
}

Dependencies

~345–800KB
~19K SLoC