Documentation
¶
Index ¶
- Constants
- func Copy(dest, src interface{}) error
- func GroupByOf(stmt *Select) string
- func LimitOf(stmt interface{}) (int, int)
- func NameValueOf(stmt *Update) []string
- func OrderByOf(stmt interface{}) string
- func OutputOf(stmt *Insert) string
- func Parse(s string) interface{}
- func StatementOf(s interface{}) interface{}
- func TableOf(stmt interface{}) string
- type Builder
- type Condition
- type Delete
- type Fields
- type GroupBy
- type Insert
- type InsertValues
- type OrderBy
- type Select
- func (s *Select) Count(count int) *Select
- func (s *Select) GroupBy(groupBy string) *GroupBy
- func (s *Select) InnerJoin(table, on string) *Select
- func (s *Select) LeftJoin(table, on string) *Select
- func (s *Select) Limit(num ...int) *Select
- func (s *Select) Offset(offset int) *Select
- func (s *Select) OrderBy(orderBy string) *OrderBy
- func (s *Select) RightJoin(table, on string) *Select
- func (s *Select) Where(conditions ...string) *SelectWhere
- type SelectFields
- type SelectWhere
- type Table
- type Tables
- type Update
- type UpdateFields
- type UpdateOrderBy
- type UpdateWhere
- type WhereParam
Constants ¶
View Source
const ( InnerJoin = iota LeftJoin RightJoin )
Variables ¶
This section is empty.
Functions ¶
func NameValueOf ¶
func StatementOf ¶
func StatementOf(s interface{}) interface{}
Types ¶
type Builder ¶
type Builder struct {
}
func (Builder) DeleteFrom ¶ added in v0.16.0
func (Builder) InsertInto ¶
func (Builder) Select ¶
func (Builder) Select(fields string) *SelectFields
type Delete ¶ added in v0.16.0
type Delete struct {
// contains filtered or unexported fields
}
func (*Delete) Where ¶ added in v0.16.0
func (d *Delete) Where(conditions ...string) *UpdateWhere
type Fields ¶
type Fields struct {
// contains filtered or unexported fields
}
func (*Fields) AliasByIndex ¶
func (*Fields) ValueByIndex ¶
type Insert ¶
type Insert struct {
// contains filtered or unexported fields
}
func (*Insert) Output ¶
func (i *Insert) Output(output string) *InsertValues
type InsertValues ¶
type InsertValues struct {
// contains filtered or unexported fields
}
func (*InsertValues) Values ¶
func (i *InsertValues) Values(values string) *Insert
type Select ¶
type Select struct {
// contains filtered or unexported fields
}
func (*Select) Where ¶
func (s *Select) Where(conditions ...string) *SelectWhere
type SelectFields ¶
type SelectFields struct {
// contains filtered or unexported fields
}
func (SelectFields) From ¶
func (f SelectFields) From(table string) *Select
type SelectWhere ¶
type SelectWhere struct {
// contains filtered or unexported fields
}
func (*SelectWhere) And ¶
func (s *SelectWhere) And(condition string) *SelectWhere
func (*SelectWhere) GroupBy ¶
func (s *SelectWhere) GroupBy(groupBy string) *GroupBy
func (*SelectWhere) Limit ¶
func (s *SelectWhere) Limit(num ...int) *Select
func (*SelectWhere) Or ¶
func (s *SelectWhere) Or(condition string) *SelectWhere
func (*SelectWhere) OrderBy ¶
func (s *SelectWhere) OrderBy(orderBy string) *OrderBy
type Tables ¶
type Tables struct {
// contains filtered or unexported fields
}
func (*Tables) TableByIndex ¶
type Update ¶
type Update struct {
// contains filtered or unexported fields
}
func (*Update) Set ¶
func (u *Update) Set(namevalues ...string) *UpdateFields
Set keyvalue pair to set Ex:
UPDATE books SET title = ?, publisher = ? dbx.Update(`books`).Set(`title = ?`, `publisher = ?`).Set(`publisher = ?`)
type UpdateFields ¶
type UpdateFields struct {
// contains filtered or unexported fields
}
func (*UpdateFields) Where ¶
func (u *UpdateFields) Where(condition string) *UpdateWhere
type UpdateOrderBy ¶ added in v0.17.0
type UpdateOrderBy struct {
// contains filtered or unexported fields
}
func (*UpdateOrderBy) Limit ¶ added in v0.17.0
func (u *UpdateOrderBy) Limit(count int) *Update
type UpdateWhere ¶
type UpdateWhere struct {
// contains filtered or unexported fields
}
func (*UpdateWhere) And ¶
func (u *UpdateWhere) And(condition string) *UpdateWhere
func (*UpdateWhere) Limit ¶ added in v0.17.0
func (u *UpdateWhere) Limit(count int) *Update
func (*UpdateWhere) Or ¶
func (u *UpdateWhere) Or(condition string) *UpdateWhere
func (*UpdateWhere) OrderBy ¶ added in v0.17.0
func (u *UpdateWhere) OrderBy(orderBy string) *UpdateOrderBy
type WhereParam ¶
func WheresOf ¶
func WheresOf(stmt interface{}) []WhereParam
Click to show internal directories.
Click to hide internal directories.