sql

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filters

func Filters(where interface{}) func(db *gorm.DB) *gorm.DB

Filters ...

func Ilike

func Ilike(key, value string) func(db *gorm.DB) *gorm.DB

Ilike Fuzzy search when there is value

func Like

func Like(key, value string) func(db *gorm.DB) *gorm.DB

Like Fuzzy search when there is value

func OnlyTrashed

func OnlyTrashed(res bool) func(db *gorm.DB) *gorm.DB

OnlyTrashed ...

func Order

func Order(str string) func(db *gorm.DB) *gorm.DB

Order Sort

func Paginate

func Paginate(pageSize, currentPage int) func(db *gorm.DB) *gorm.DB

Paginate ...

func Where

func Where(key, conditions string, value interface{}) func(db *gorm.DB) *gorm.DB

Where Where to search when there is value

func WhereIn

func WhereIn(key string, value interface{}) func(db *gorm.DB) *gorm.DB

WhereIn WhereIn search when there is value

Types

type Json

type Json []byte

func (Json) Equals

func (j Json) Equals(j1 Json) bool

Equals

func (Json) IsNull

func (j Json) IsNull() bool

IsNull

func (Json) MarshalJSON

func (m Json) MarshalJSON() ([]byte, error)

MarshalJSON

func (*Json) Scan

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

Scan

func (*Json) UnmarshalJSON

func (m *Json) UnmarshalJSON(data []byte) error

UnmarshalJSON

func (Json) Value

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

Value

type Time

type Time struct {
	sql.NullTime
}

Time 时间类型

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

MarshalJSON 序列化为JSON

func (*Time) Scan

func (t *Time) Scan(v interface{}) error

Scan 读取插入

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) error

UnmarshalJSON 反序列化为JSON

func (Time) Value

func (t Time) Value() (driver.Value, error)

Value 插入

Jump to

Keyboard shortcuts

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