1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-06 01:30:20 +00:00

orm: add test case for json & jsonb type support

This commit is contained in:
miraclesu
2016-04-08 22:26:28 +08:00
parent 657744efb1
commit e95bef1331
2 changed files with 17 additions and 0 deletions

View File

@ -112,6 +112,8 @@ type Data struct {
Boolean bool
Char string `orm:"size(50)"`
Text string `orm:"type(text)"`
Json string `orm:"type(json);default({\"name\":\"json\"})"`
Jsonb string `orm:"type(jsonb)"`
Time time.Time `orm:"type(time)"`
Date time.Time `orm:"type(date)"`
DateTime time.Time `orm:"column(datetime)"`
@ -137,6 +139,8 @@ type DataNull struct {
Boolean bool `orm:"null"`
Char string `orm:"null;size(50)"`
Text string `orm:"null;type(text)"`
Json string `orm:"type(json);null"`
Jsonb string `orm:"type(jsonb);null"`
Time time.Time `orm:"null;type(time)"`
Date time.Time `orm:"null;type(date)"`
DateTime time.Time `orm:"null;column(datetime)"`