Documentation ¶
Overview ¶
copy from github.com/jmoiron/sqlx/bind.go
Index ¶
- Constants
- func In(query string, args ...interface{}) (string, []interface{}, error)
- type Block
- type Condition
- type Group
- type Or
- type Order
- type Sqler
- func (s *Sqler) Do() (string, []interface{}, error)
- func (s *Sqler) DoCount(countSql ...string) (string, []interface{}, error)
- func (s *Sqler) From(sql string, args ...interface{})
- func (s *Sqler) Group(groupFn func(group *Group))
- func (s *Sqler) GroupString(fields ...string)
- func (s *Sqler) Having(condition func(having *Condition))
- func (s *Sqler) HavingString(sql string, args ...interface{})
- func (s *Sqler) Join(sql string, condition func(on *Condition))
- func (s *Sqler) JoinString(sql string, args ...interface{})
- func (s *Sqler) Limit(offset uint, limit uint)
- func (s *Sqler) Order(order func(order *Order))
- func (s *Sqler) OrderString(sql string)
- func (s *Sqler) Select(selectFn func(field *Block))
- func (s *Sqler) SelectString(sql string, args ...interface{})
- func (s *Sqler) Where(condition func(where *Condition))
- func (s *Sqler) WhereString(sql string, args ...interface{})
Constants ¶
View Source
const ( DESC = "desc" ASC = "asc" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Condition ¶
type Condition struct {
// contains filtered or unexported fields
}
Condition builder, use for `where`, `on`, `having`
func NewCondition ¶
type Sqler ¶
type Sqler struct {
// contains filtered or unexported fields
}
func (*Sqler) GroupString ¶
func (*Sqler) HavingString ¶
func (*Sqler) JoinString ¶
Join table, can be called multiple times
func (*Sqler) OrderString ¶
func (*Sqler) SelectString ¶
func (*Sqler) WhereString ¶
Where builder, cannot be called more than once
Click to show internal directories.
Click to hide internal directories.