Documentation
¶
Index ¶
- Constants
- func Use(driver Driver)
- type Bundle
- type Columns
- type Condition
- type DefaultParser
- type Delete
- type Driver
- type Filter
- func Between(column string, first interface{}, second interface{}) Filter
- func BitContain(column string, value interface{}) Filter
- func BitNotContain(column string, value interface{}) Filter
- func Contain(column string, value interface{}) Filter
- func EndWith(column string, value interface{}) Filter
- func Equal(column string, value interface{}) Filter
- func GreaterThan(column string, value interface{}) Filter
- func GreaterThanOrEqual(column string, value interface{}) Filter
- func InGroup(column string, value interface{}) Filter
- func InSubQuery(column string, value Select) Filter
- func IsNull(column string) Filter
- func LessThan(column string, value interface{}) Filter
- func LessThanOrEqual(column string, value interface{}) Filter
- func NotBetween(column string, first interface{}, second interface{}) Filter
- func NotContain(column string, value interface{}) Filter
- func NotEndWith(column string, value interface{}) Filter
- func NotEqual(column string, value interface{}) Filter
- func NotInGroup(column string, value interface{}) Filter
- func NotInSubQuery(column string, value Select) Filter
- func NotNull(column string) Filter
- func NotStartWith(column string, value interface{}) Filter
- func StartWith(column string, value interface{}) Filter
- type Filters
- type GroupBy
- type Insert
- type OrderBy
- type Paging
- type Parser
- type Select
- func (s *Select) GetAll(dest interface{}) error
- func (s *Select) GetOne(dest interface{}) error
- func (s *Select) GetPage(dest interface{}) (int, error)
- func (s *Select) SetAND(args ...interface{}) *Select
- func (s *Select) SetASC(args ...string) *Select
- func (s *Select) SetCols(args ...string) *Select
- func (s *Select) SetCond(arg Condition) *Select
- func (s *Select) SetDESC(args ...string) *Select
- func (s *Select) SetForce() *Select
- func (s *Select) SetGroup(args ...string) *Select
- func (s *Select) SetOR(args ...interface{}) *Select
- func (s *Select) SetPage(offset, number, size int) *Select
- func (s *Select) Use(driver Driver) *Select
- type SubCond
- type Update
- func (u *Update) Execute() error
- func (u *Update) SetAND(args ...interface{}) *Update
- func (u *Update) SetCols(args ...string) *Update
- func (u *Update) SetCond(arg Condition) *Update
- func (u *Update) SetForce() *Update
- func (u *Update) SetOR(args ...interface{}) *Update
- func (u *Update) SetVals(arg interface{}) *Update
- func (u *Update) Use(driver Driver) *Update
- func (v *Update) ValuesRef() reflect.Value
Constants ¶
View Source
const ( SortAsc = "ASC" SortDesc = "DESC" )
View Source
const ( OrRelation = "OR" AndRelation = "AND" )
View Source
const ( EqualFilter NotEqualFilter GreaterThanFilter GreaterThanOrEqualFilter LessThanFilter LessThanOrEqualFilter ContainFilter NotContainFilter BitContainFilter BitNotContainFilter StartWithFilter NotStartWithFilter EndWithFilter NotEndWithFilter IsNullFilter NotNullFilter InGroupFilter NotInGroupFilter BetweenFilter NotBetweenFilter InSubQueryFilter NotInSubQueryFilter )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bundle ¶
type DefaultParser ¶
type DefaultParser struct{}
func (DefaultParser) NameFunc ¶
func (d DefaultParser) NameFunc(s string) string
func (DefaultParser) TagFunc ¶
func (d DefaultParser) TagFunc(s string) string
func (DefaultParser) TagName ¶
func (d DefaultParser) TagName() string
type Delete ¶
type Delete struct {
From string
// contains filtered or unexported fields
}
Delete 删除表达式
type Driver ¶
type Driver interface {
GetOne(dest interface{}, exp *Select) error
GetAll(dest interface{}, exp *Select) error
GetPage(dest interface{}, exp *Select) (int, error)
ExecInsert(exp *Insert) error
ExecUpdate(exp *Update) error
ExecDelete(exp *Delete) error
ExecBundle(exp *Bundle) error
SetMapParser(psr Parser)
}
type Filter ¶
Filter 过滤条件
func BitContain ¶
func BitNotContain ¶
func GreaterThan ¶
func GreaterThanOrEqual ¶
func InSubQuery ¶
func LessThanOrEqual ¶
func NotBetween ¶
func NotContain ¶
func NotEndWith ¶
func NotInGroup ¶
func NotInSubQuery ¶
func NotStartWith ¶
type Insert ¶
type Insert struct {
Into string
// contains filtered or unexported fields
}
Insert 新增表达式
type Select ¶
type Select struct {
From string
Columns Columns
Paging Paging
OrderBy []OrderBy
GroupBy GroupBy
// contains filtered or unexported fields
}
Select 查询表达式
Source Files
¶
Click to show internal directories.
Click to hide internal directories.