1. 首页
  2. 数据库
  3. 其它
  4. 数据类型:GORM自定义数据类型集合 源码

数据类型:GORM自定义数据类型集合 源码

上传者: 2021-02-07 17:57:26上传 ZIP文件 19KB 热度 49次
GORM数据类型 JSON格式 sqlite,mysql,postgres支持 import "gorm.io/datatypes" type UserWithJSON struct { gorm. Model Name string Attributes datatypes. JSON } DB. Create ( & User { Name : "json-1" , Attributes : datatypes . JSON ([] byte ( `{"name": "jinzhu", "age": 18, "tags": ["tag1", "tag2"]
下载地址
用户评论