Documentation ¶
Index ¶
- Constants
- type Delete
- type IBasicRepository
- type IRepository
- type ITxRepository
- type Query
- type TxKey
- type Update
- type Where
- func Between(column string, v1, v2 interface{}) *Where
- func Eq(column string, value interface{}) *Where
- func Gt(column string, value interface{}) *Where
- func Gte(column string, value interface{}) *Where
- func In(column string, value interface{}) *Where
- func IsNotNull(column string) *Where
- func IsNull(column string) *Where
- func Like(column string, value interface{}) *Where
- func Lt(column string, value interface{}) *Where
- func Lte(column string, value interface{}) *Where
- func Ne(column string, value interface{}) *Where
- func NotIn(column string, value interface{}) *Where
- type Wheres
Constants ¶
View Source
const ( IN = "IN" NotIN = "NOT IN" BETWEEN = "BETWEEN" LIKE = "LIKE" IsNULL = "IS NULL" IsNotNULL = "IS NOT NULL" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IBasicRepository ¶
type IBasicRepository interface { IRepository ITxRepository }
IBasicRepository 基础查询与事务
type IRepository ¶
type IRepository interface { Get(*Query) error Find(*Query) error Create(interface{}) error CreateInTx(context.Context, interface{}) error Update(*Update) error UpdateInTx(context.Context, *Update) error UpdateColumn(*Update) error UpdateColumnInTx(context.Context, *Update) error Delete(*Delete) error DeleteInTx(context.Context, *Delete) error }
IRepository 基础查询
type ITxRepository ¶
type ITxRepository interface { Tx(context.Context, func(context.Context) error) error GetTx(context.Context) (interface{}, error) }
ITxRepository 事务
Click to show internal directories.
Click to hide internal directories.