Documentation ¶
Index ¶
- Constants
- func DateBetween(column, dateStart, dateEnd string) clause.Expression
- func List[T any, O querytypes.Ordered](db *gorm.DB, req *querytypes.ListReq[O]) ([]T, error)
- func ListClause[O querytypes.Ordered](req *querytypes.ListReq[O]) []clause.Expression
- func NewScope(field string, op dbi.Operation, args ...interface{}) func(*gorm.DB) *gorm.DB
- 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 ChainDB
- type Clause
- type Clause2
- type EmptyClause
- type Expression
- type Limit
- type ListReq
- type PageSortReq
- type RangeReq
Constants ¶
View Source
const ( IDEQUAL = dbi.ColumnId + dbi.ExprEqual NAMEEQUAL = dbi.ColumnName + dbi.ExprEqual )
Variables ¶
This section is empty.
Functions ¶
func DateBetween ¶
func DateBetween(column, dateStart, dateEnd string) clause.Expression
func List ¶
func List[T any, O querytypes.Ordered](db *gorm.DB, req *querytypes.ListReq[O]) ([]T, error)
unsupported data,完全不可用 deprecated: 不可用
func ListClause ¶
func ListClause[O querytypes.Ordered](req *querytypes.ListReq[O]) []clause.Expression
func NewWhereClause ¶
func NewWhereClause(field string, op dbi.Operation, args ...interface{}) clause.Expression
Types ¶
type ChainDB ¶
func NewChainDB ¶
type Clause2 ¶
type Clause2 struct { Expr []string Var []interface{} }
type EmptyClause ¶
type EmptyClause struct { }
func (*EmptyClause) Build ¶
func (receiver *EmptyClause) Build(builder clause.Builder)
func (*EmptyClause) ModifyStatement ¶
func (receiver *EmptyClause) ModifyStatement(*gorm.Statement)
type Expression ¶
type Expression dbi.FilterExpression
type ListReq ¶
type ListReq[T querytypes.Ordered] querytypes.ListReq[T]
func (*ListReq[O]) Clause ¶
func (req *ListReq[O]) Clause() []clause.Expression
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.