ormx

package
v6.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c DBConfig) (*gorm.DB, error)

New Create gorm.DB instance

Types

type DBConfig

type DBConfig struct {
	Debug        bool
	DBType       string
	DSN          string
	MaxLifetime  int
	MaxOpenConns int
	MaxIdleConns int
	TablePrefix  string
}

DBConfig GORM DBConfig

type JSONArr

type JSONArr json.RawMessage

func (*JSONArr) MarshalJSON

func (j *JSONArr) MarshalJSON() ([]byte, error)

func (*JSONArr) Scan

func (j *JSONArr) Scan(value interface{}) error

实现 sql.Scanner 接口,Scan 将 value 扫描至 Jsonb

func (*JSONArr) UnmarshalJSON

func (j *JSONArr) UnmarshalJSON(data []byte) error

func (JSONArr) Value

func (j JSONArr) Value() (driver.Value, error)

实现 driver.Valuer 接口,Value 返回 json value

type JSONObj

type JSONObj json.RawMessage

func (*JSONObj) MarshalJSON

func (j *JSONObj) MarshalJSON() ([]byte, error)

func (*JSONObj) Scan

func (j *JSONObj) Scan(value interface{}) error

实现 sql.Scanner 接口,Scan 将 value 扫描至 Jsonb

func (*JSONObj) UnmarshalJSON

func (j *JSONObj) UnmarshalJSON(data []byte) error

func (JSONObj) Value

func (j JSONObj) Value() (driver.Value, error)

实现 driver.Valuer 接口,Value 返回 json value

type TKitLogger added in v6.6.0

type TKitLogger struct {
	// contains filtered or unexported fields
}

func (*TKitLogger) Printf added in v6.6.0

func (l *TKitLogger) Printf(s string, i ...interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL