Documentation ¶
Index ¶
- func ByValidEqual[T comparable](column string, v T) clause.Expression
- func DateBetween(column, dateStart, dateEnd string) clause.Expression
- func List[T any, O request.Ordered](db *gorm.DB, req *request.ListReq[O]) ([]T, error)
- func ListClause[O request.Ordered](req *request.ListReq[O]) []clause.Expression
- func NewWhereClause(field string, op dbi.Operation, args ...interface{}) clause.Expression
- func Page(pageNo, pageSize int) clause.Limit
- func Sort(column string, typ request.SortType) clause.Expression
- func TableName(tx *gorm.DB, name string) *gorm.DB
- type ChainClause
- type Expression
- type Limit
- type ListReq
- type PageSortReq
- type RangeReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByValidEqual ¶ added in v1.7.8
func ByValidEqual[T comparable](column string, v T) clause.Expression
func DateBetween ¶
func DateBetween(column, dateStart, dateEnd string) clause.Expression
func ListClause ¶
func NewWhereClause ¶
func NewWhereClause(field string, op dbi.Operation, args ...interface{}) clause.Expression
Types ¶
type ChainClause ¶ added in v1.6.13
func (ChainClause) ById ¶ added in v1.6.13
func (c ChainClause) ById(id int) ChainClause
func (ChainClause) ByIdNoCheck ¶ added in v1.6.13
func (c ChainClause) ByIdNoCheck(id any) ChainClause
func (ChainClause) ByName ¶ added in v1.6.13
func (c ChainClause) ByName(name string) ChainClause
func (ChainClause) ByNameNoCheck ¶ added in v1.6.13
func (c ChainClause) ByNameNoCheck(name string) ChainClause
type Expression ¶
type Expression dbi.FilterExpr
type PageSortReq ¶
type PageSortReq request.PageSortReq
func (*PageSortReq) Clause ¶
func (req *PageSortReq) Clause() []clause.Expression
Click to show internal directories.
Click to hide internal directories.