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 ¶
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 ¶
func (ChainClause) ById ¶
func (c ChainClause) ById(id int) ChainClause
func (ChainClause) ByIdNoCheck ¶
func (c ChainClause) ByIdNoCheck(id any) ChainClause
func (ChainClause) ByName ¶
func (c ChainClause) ByName(name string) ChainClause
func (ChainClause) ByNameNoCheck ¶
func (c ChainClause) ByNameNoCheck(name string) ChainClause
type Expression ¶
type Expression dbi.FilterExpr
type ListReq ¶ added in v1.9.0
func (*ListReq[O]) Clause ¶ added in v1.9.0
func (req *ListReq[O]) Clause() []clause.Expression
type PageSortReq ¶ added in v1.9.0
type PageSortReq request.PageSortReq
func (*PageSortReq) Clause ¶ added in v1.9.0
func (req *PageSortReq) Clause() []clause.Expression
Click to show internal directories.
Click to hide internal directories.