Documentation ¶
Index ¶
- func ByValidEqual[T comparable](column string, v T) clause.Expression
- func DateBetween(column, dateStart, dateEnd string) clause.Expression
- func FindByList[T any, O constraints.Ordered](db *gorm.DB, req *param.List[O]) ([]T, error)
- func ListClause[O constraints.Ordered](req *param.List[O]) []clause.Expression
- func NewWhereClause(field string, op dbi.Operation, args ...interface{}) clause.Expression
- func PageExpr(pageNo, pageSize int) clause.Limit
- func SortExpr(column string, typ param.SortType) clause.Expression
- func TableName(tx *gorm.DB, name string) *gorm.DB
- type ChainClause
- type Expression
- type Limit
- type List
- type PageSort
- type Range
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 FindByList ¶
func ListClause ¶
func ListClause[O constraints.Ordered](req *param.List[O]) []clause.Expression
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 List ¶
type List[T constraints.Ordered] param.List[T]
func (*List[O]) Clause ¶
func (req *List[O]) Clause() []clause.Expression
Click to show internal directories.
Click to hide internal directories.