dao

package
v0.0.0-...-96272ab Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

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

func (*Dao) GetClient

func (d *Dao) GetClient() *gorm.DB

func (*Dao) NewDao

func (d *Dao) NewDao(dialector gorm.Dialector) error

func (*Dao) ResultTostring

func (d *Dao) ResultTostring(rows *sql.Rows, configColumn []configs.Column) ([]ResultJson, error)

func (*Dao) SelectMaxAndMin

func (d *Dao) SelectMaxAndMin(sql string) Section

type FieldID

type FieldID struct {
	Status bool
	Key    string
	Value  string
}

type JSONSerializer

type JSONSerializer struct {
}

JSONSerializer json序列化器

func (JSONSerializer) Scan

func (JSONSerializer) Scan(ctx context.Context, field *schema.Field, dst reflect.Value, dbValue interface{}) (err error)

实现 Scan 方法

func (JSONSerializer) Value

func (JSONSerializer) Value(ctx context.Context, field *schema.Field, dst reflect.Value, fieldValue interface{}) (interface{}, error)

实现 Value 方法

type ResultJson

type ResultJson struct {
	JsonString string
	FieldID    FieldID
}

type Section

type Section struct {
	Min int
	Max int
}

Jump to

Keyboard shortcuts

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