Documentation ¶
Index ¶
- Constants
- func Custom(query string, args ...Value) string
- func EscapeID(id string) string
- func GetDefaultLocation() *time.Location
- func InterpolateParams(query string, args []Value, loc *time.Location) (string, error)
- func SetDefaultLocation(loc *time.Location)
- type QueryBuilder
- func (q *QueryBuilder) And(query string, args ...Value) *QueryBuilder
- func (q *QueryBuilder) AndRow(row Row) *QueryBuilder
- func (q *QueryBuilder) As(name string) *QueryBuilder
- func (q *QueryBuilder) Build() string
- func (q *QueryBuilder) Clone() *QueryBuilder
- func (q *QueryBuilder) Count(field string) *QueryBuilder
- func (q *QueryBuilder) Delete() *QueryBuilder
- func (q *QueryBuilder) Fields(fields ...string) *QueryBuilder
- func (q *QueryBuilder) Format(query string, args ...Value) string
- func (q *QueryBuilder) GroupBy(tpl string, args ...Value) *QueryBuilder
- func (q *QueryBuilder) Having(tpl string, args ...Value) *QueryBuilder
- func (q *QueryBuilder) InnerJoin(tableName string, fields ...string) *QueryBuilder
- func (q *QueryBuilder) Insert(row Row) *QueryBuilder
- func (q *QueryBuilder) InsertMany(rows []Row) *QueryBuilder
- func (q *QueryBuilder) Join(tableName string, fields ...string) *QueryBuilder
- func (q *QueryBuilder) LeftJoin(tableName string, fields ...string) *QueryBuilder
- func (q *QueryBuilder) Limit(n int) *QueryBuilder
- func (q *QueryBuilder) Location(loc *time.Location) *QueryBuilder
- func (q *QueryBuilder) On(condition string, args ...Value) *QueryBuilder
- func (q *QueryBuilder) OnDuplicateKeyUpdate() *QueryBuilder
- func (q *QueryBuilder) OrderBy(tpl string, args ...Value) *QueryBuilder
- func (q *QueryBuilder) RightJoin(tableName string, fields ...string) *QueryBuilder
- func (q *QueryBuilder) Select(fields ...string) *QueryBuilder
- func (q *QueryBuilder) SelectDistinct(fields ...string) *QueryBuilder
- func (q *QueryBuilder) Set(update string, args ...Value) *QueryBuilder
- func (q *QueryBuilder) SetRow(row Row) *QueryBuilder
- func (q *QueryBuilder) Skip(n int) *QueryBuilder
- func (q *QueryBuilder) Table(tableName string) *QueryBuilder
- func (q *QueryBuilder) Update() *QueryBuilder
- func (q *QueryBuilder) Where(query string, args ...Value) *QueryBuilder
- func (q *QueryBuilder) WhereRow(row Row) *QueryBuilder
- type Row
- type Value
Constants ¶
View Source
const DELETE = "DELETE"
View Source
const INNER_JOIN = "INNER JOIN"
View Source
const INSERT = "INSERT"
View Source
const INSERT_OR_UPDATE = "INSERT_OR_UPDATE"
View Source
const JOIN = "JOIN"
View Source
const LEFT_JOIN = "LEFT JOIN"
View Source
const RIGHT_JOIN = "RIGHT JOIN"
View Source
const SELECT = "SELECT"
View Source
const SELECT_DISTINCT = "SELECT DISTINCT"
View Source
const UPDATE = "UPDATE"
Variables ¶
This section is empty.
Functions ¶
func GetDefaultLocation ¶
func InterpolateParams ¶
func SetDefaultLocation ¶
Types ¶
type QueryBuilder ¶
type QueryBuilder struct {
// contains filtered or unexported fields
}
func Table ¶
func Table(tableName string) *QueryBuilder
func (*QueryBuilder) And ¶
func (q *QueryBuilder) And(query string, args ...Value) *QueryBuilder
func (*QueryBuilder) AndRow ¶
func (q *QueryBuilder) AndRow(row Row) *QueryBuilder
func (*QueryBuilder) As ¶
func (q *QueryBuilder) As(name string) *QueryBuilder
func (*QueryBuilder) Build ¶
func (q *QueryBuilder) Build() string
func (*QueryBuilder) Clone ¶
func (q *QueryBuilder) Clone() *QueryBuilder
func (*QueryBuilder) Count ¶
func (q *QueryBuilder) Count(field string) *QueryBuilder
func (*QueryBuilder) Delete ¶
func (q *QueryBuilder) Delete() *QueryBuilder
func (*QueryBuilder) Fields ¶
func (q *QueryBuilder) Fields(fields ...string) *QueryBuilder
func (*QueryBuilder) GroupBy ¶
func (q *QueryBuilder) GroupBy(tpl string, args ...Value) *QueryBuilder
func (*QueryBuilder) Having ¶
func (q *QueryBuilder) Having(tpl string, args ...Value) *QueryBuilder
func (*QueryBuilder) InnerJoin ¶
func (q *QueryBuilder) InnerJoin(tableName string, fields ...string) *QueryBuilder
func (*QueryBuilder) Insert ¶
func (q *QueryBuilder) Insert(row Row) *QueryBuilder
func (*QueryBuilder) InsertMany ¶
func (q *QueryBuilder) InsertMany(rows []Row) *QueryBuilder
func (*QueryBuilder) Join ¶
func (q *QueryBuilder) Join(tableName string, fields ...string) *QueryBuilder
func (*QueryBuilder) LeftJoin ¶
func (q *QueryBuilder) LeftJoin(tableName string, fields ...string) *QueryBuilder
func (*QueryBuilder) Limit ¶
func (q *QueryBuilder) Limit(n int) *QueryBuilder
func (*QueryBuilder) Location ¶
func (q *QueryBuilder) Location(loc *time.Location) *QueryBuilder
func (*QueryBuilder) On ¶
func (q *QueryBuilder) On(condition string, args ...Value) *QueryBuilder
func (*QueryBuilder) OnDuplicateKeyUpdate ¶
func (q *QueryBuilder) OnDuplicateKeyUpdate() *QueryBuilder
func (*QueryBuilder) OrderBy ¶
func (q *QueryBuilder) OrderBy(tpl string, args ...Value) *QueryBuilder
func (*QueryBuilder) RightJoin ¶
func (q *QueryBuilder) RightJoin(tableName string, fields ...string) *QueryBuilder
func (*QueryBuilder) Select ¶
func (q *QueryBuilder) Select(fields ...string) *QueryBuilder
func (*QueryBuilder) SelectDistinct ¶
func (q *QueryBuilder) SelectDistinct(fields ...string) *QueryBuilder
func (*QueryBuilder) Set ¶
func (q *QueryBuilder) Set(update string, args ...Value) *QueryBuilder
func (*QueryBuilder) SetRow ¶
func (q *QueryBuilder) SetRow(row Row) *QueryBuilder
func (*QueryBuilder) Skip ¶
func (q *QueryBuilder) Skip(n int) *QueryBuilder
func (*QueryBuilder) Table ¶
func (q *QueryBuilder) Table(tableName string) *QueryBuilder
func (*QueryBuilder) Update ¶
func (q *QueryBuilder) Update() *QueryBuilder
func (*QueryBuilder) Where ¶
func (q *QueryBuilder) Where(query string, args ...Value) *QueryBuilder
func (*QueryBuilder) WhereRow ¶
func (q *QueryBuilder) WhereRow(row Row) *QueryBuilder
Click to show internal directories.
Click to hide internal directories.