#jsonb #diesel #pg #thing

macro bloom42_diesel_as_jsonb

Use your structs as Jsonb with diesel and PG

1 unstable release

Uses old Rust 2015

0.1.2 Jan 9, 2019

#4 in #jsonb

MIT license

4KB
53 lines

Diesel As JSONB (for PG)

Usage

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

struct Wrapper {
    things: Vec<Something> // For JSONB[]
    thing: Something // For JSONB
}

Dependencies

~2.5MB
~53K SLoC