Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Db is the global database reference Db *gorm.DB )
Functions ¶
func DropAllTables ¶
func DropAllTables()
DropAllTables drops all tables and relations, only works with local database in debug mode
func InitializeDatabase ¶
func InitializeDatabase()
InitializeDatabase opens and migrates the database if necessary
Types ¶
type JSONMap ¶
type JSONMap map[string]interface{}
JSONMap defiend JSON data type, need to implements driver.Valuer, sql.Scanner interface
func (JSONMap) GormDBDataType ¶
GormDBDataType gorm db data type
func (JSONMap) GormDataType ¶
GormDataType gorm common data type
func (JSONMap) MarshalJSON ¶
MarshalJSON to output non base64 encoded []byte
func (*JSONMap) UnmarshalJSON ¶
UnmarshalJSON to deserialize []byte
Click to show internal directories.
Click to hide internal directories.