Categorygithub.com/KoushikMaharaj/gorm-jsonb
repositorypackage
0.1.1
Repository: https://github.com/koushikmaharaj/gorm-jsonb.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

gorm-jsonb

gorm jsonb datatype

In this package you can store json as well as json array in database


install

go get github.com/KoushikMaharaj/gorm-jsonb

Creation of table

postgres
CREATE TABLE public."data"(
    info    jsonb NULL,
    address jsonb NULL
);
mysql
CREATE TABLE `data`(
    `info`    json DEFAULT NULL,
    `address` json DEFAULT NULL
);

example

Please refer example


Reference

dariubs