Documentation ¶
Index ¶
- type BinaryUUID
- type ConfigMap
- type Database
- func (this *Database) Close()
- func (this *Database) GetConfig(name string) any
- func (this *Database) GetConnection() *gorm.DB
- func (this *Database) GetConnectionWithDebug() *gorm.DB
- func (this *Database) GetDriver() interfaces.Driver
- func (this *Database) WithConfig(config ConfigMap) interfaces.Database
- func (this *Database) WithDriver(driver interfaces.Driver) interfaces.Database
- type Datetime
- type Model
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryUUID ¶
binary uuid wrapper over uuid.UUID example - gorm:"type:binary(16);default:(UUID_TO_BIN(UUID()));
func (BinaryUUID) GormDataType ¶
func (this BinaryUUID) GormDataType() string
sql data type for gorm
func (BinaryUUID) MarshalJSON ¶
func (this BinaryUUID) MarshalJSON() ([]byte, error)
convert to json string
func (BinaryUUID) String ¶
func (this BinaryUUID) String() string
func (*BinaryUUID) UnmarshalJSON ¶
func (this *BinaryUUID) UnmarshalJSON(by []byte) error
convert from json string
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
*
- 数据库 *
- @create 2021-9-15
- @author deatil
func (*Database) WithConfig ¶
func (this *Database) WithConfig(config ConfigMap) interfaces.Database
设置配置
func (*Database) WithDriver ¶
func (this *Database) WithDriver(driver interfaces.Driver) interfaces.Database
*
- 设置驱动
type Datetime ¶
custom time types Used to format time into a human-readable string
func (Datetime) MarshalJSON ¶
func (*Datetime) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.