gorm

package
v0.0.0-...-fc17aaa Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RelationBlocklistColumns = struct {
	UID        string
	InvitedUID string
	CreateTime string
	DeleteTime string
}{
	UID:        "uid",
	InvitedUID: "invited_uid",
	CreateTime: "create_time",
	DeleteTime: "delete_time",
}

RelationBlocklistColumns get sql column name.获取数据库列名

Functions

func CloseRelated

func CloseRelated()

CloseRelated 关闭全局预加载

func IsNotFound

func IsNotFound(err error) bool

IsNotFound ErrRecordNotFound

func OpenRelated

func OpenRelated()

OpenRelated 打开全局预加载

func RelationBlocklistMgr

func RelationBlocklistMgr(db *gorm.DB) *_RelationBlocklistMgr

RelationBlocklistMgr open func

Types

type Condition

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

自定义sql查询

func (*Condition) And

func (c *Condition) And(column string, cases string, value interface{}) *Condition

And a Condition by and .and 一个条件

func (*Condition) AndWithCondition

func (c *Condition) AndWithCondition(condition bool, column string, cases string, value interface{}) *Condition

func (*Condition) Get

func (c *Condition) Get() (where string, out []interface{})

func (*Condition) Or

func (c *Condition) Or(column string, cases string, value interface{}) *Condition

Or a Condition by or .or 一个条件

func (*Condition) OrWithCondition

func (c *Condition) OrWithCondition(condition bool, column string, cases string, value interface{}) *Condition

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option overrides behavior of Connect.

type RelationBlocklist

type RelationBlocklist struct {
	UID        int64 `gorm:"column:uid;type:bigint(20);not null"`
	InvitedUID int64 `gorm:"column:invited_uid;type:bigint(20);not null;comment:'拉黑uid'"`       // 拉黑uid
	CreateTime int   `gorm:"column:create_time;type:int(11);not null;comment:'创建时间'"`           // 创建时间
	DeleteTime int   `gorm:"column:delete_time;type:int(11);not null;default:0;comment:'删除时间'"` // 删除时间
}

RelationBlocklist [...]

Jump to

Keyboard shortcuts

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