Documentation
¶
Index ¶
- Variables
- func ByPrimaryKey(v any) clause.Expression
- func ConditionByStruct(param any) (clause.Expression, error)
- func EqualByStruct(param any) clause.Expression
- func FindByPageSort[T any](db *gorm.DB, req *param.PageSort, clauses ...clause.Expression) ([]T, int64, error)
- func FindByPageSortEmbed[T any](db *gorm.DB, req *param.PageSortEmbed, clauses ...clause.Expression) ([]T, int64, error)
- func NewCondition(field string, op dbi.ConditionOperation, args ...any) clause.Expression
- func PageExpr(pageNo, pageSize int) clause.Limit
- func SortExpr(column string, typ param.SortType) clause.Expression
- type Between
- type ChainClause
- type ConditionExpr
- type FilterExpr
- type FilterExprs
- type IsNotNull
- type IsNull
- type Limit
- type Not
- type PageEmbed
- type PageSort
- type PageSortEmbed
- type Range
- type RangeInTwoField
Constants ¶
This section is empty.
Variables ¶
View Source
var ConditionExprType = reflect.TypeOf((*ConditionExpr)(nil)).Elem()
Functions ¶
func ByPrimaryKey ¶
func ByPrimaryKey(v any) clause.Expression
func ConditionByStruct ¶
func ConditionByStruct(param any) (clause.Expression, error)
func EqualByStruct ¶
func EqualByStruct(param any) clause.Expression
func FindByPageSort ¶
func FindByPageSortEmbed ¶
func FindByPageSortEmbed[T any](db *gorm.DB, req *param.PageSortEmbed, clauses ...clause.Expression) ([]T, int64, error)
func NewCondition ¶
func NewCondition(field string, op dbi.ConditionOperation, args ...any) clause.Expression
Types ¶
type Between ¶
func (Between) NegationBuild ¶
type ChainClause ¶
func (ChainClause) ById ¶
func (c ChainClause) ById(id any) ChainClause
func (ChainClause) ByName ¶
func (c ChainClause) ByName(name string) ChainClause
type ConditionExpr ¶
type ConditionExpr interface {
Condition() clause.Expression
}
type FilterExpr ¶
type FilterExpr dbi.FilterExpr
func (*FilterExpr) Condition ¶
func (f *FilterExpr) Condition() clause.Expression
type FilterExprs ¶
type FilterExprs dbi.FilterExprs
func (FilterExprs) Condition ¶
func (f FilterExprs) Condition() clause.Expression
type Not ¶
type Not struct {
Expr clause.NegationExpressionBuilder
}
type PageSortEmbed ¶
type PageSortEmbed param.PageSortEmbed
func (*PageSortEmbed) Clause ¶
func (req *PageSortEmbed) Clause() []clause.Expression
type RangeInTwoField ¶
type RangeInTwoField[T param.Ordered] param.RangeInTwoField[T]
func (*RangeInTwoField[T]) Condition ¶
func (req *RangeInTwoField[T]) Condition() clause.Expression
Click to show internal directories.
Click to hide internal directories.