#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

#444 in Procedural macros

Download history 200/week @ 2024-11-16 140/week @ 2024-11-23 653/week @ 2024-11-30 654/week @ 2024-12-07 390/week @ 2024-12-14 120/week @ 2024-12-21 112/week @ 2024-12-28 553/week @ 2025-01-04 406/week @ 2025-01-11 263/week @ 2025-01-18 644/week @ 2025-01-25 430/week @ 2025-02-01 648/week @ 2025-02-08 474/week @ 2025-02-15 456/week @ 2025-02-22 232/week @ 2025-03-01

1,852 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

~235–670KB
~16K SLoC