Skip to content

Support JSON/JSONB ? #36

@kevinschoon

Description

@kevinschoon

Do you had any plans to support Postgres JSON/JSONB data types? One example would be a "containment" query against JSONB structures.

Currently I use a work around like this:

type Tag struct {
    Key string
    Value string
    ....
}
raw, _ := json.Marshal(Tag{Key: "some-key", "Value": "some-value"})
lk.Select().From("table").Where(lk.Raw(fmt.Sprintf(`tags @> '%s'`, string(raw))))

Thank you for your work on this wonderful library!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions