#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

#382 in Procedural macros

Download history 878/week @ 2024-10-18 806/week @ 2024-10-25 781/week @ 2024-11-01 1156/week @ 2024-11-08 260/week @ 2024-11-15 151/week @ 2024-11-22 558/week @ 2024-11-29 612/week @ 2024-12-06 504/week @ 2024-12-13 126/week @ 2024-12-20 117/week @ 2024-12-27 521/week @ 2025-01-03 453/week @ 2025-01-10 262/week @ 2025-01-17 486/week @ 2025-01-24 515/week @ 2025-01-31

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

~255–700KB
~16K SLoC