Documentation ¶
Index ¶
- Constants
- func DateBetween(column, dateStart, dateEnd string) clause.Expression
- func List[T any, O request2.Ordered](db *gorm.DB, req *request2.ListReq[O]) ([]T, error)
- func ListClause[O request2.Ordered](req *request2.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 ListClause ¶
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 PageSortReq ¶
type PageSortReq request2.PageSortReq
func (*PageSortReq) Clause ¶
func (req *PageSortReq) Clause() []clause.Expression
Click to show internal directories.
Click to hide internal directories.