Documentation
¶
Index ¶
- func SetDebug(value bool)
- type Condition
- type Statement
- func (stmt *Statement) And(clause string, args ...interface{}) *Statement
- func (stmt *Statement) AndGroup(c func(s *Statement)) *Statement
- func (stmt *Statement) Delete() (string, []interface{})
- func (stmt *Statement) Field(name string, value interface{}) *Statement
- func (stmt *Statement) GroupBy(group string) *Statement
- func (stmt *Statement) InnerJoin(table string, clause string, args ...interface{}) *Statement
- func (stmt *Statement) Insert() (string, []interface{})
- func (stmt *Statement) Join(table string, join string, clause string, args []interface{}) *Statement
- func (stmt *Statement) LeftJoin(table string, clause string, args ...interface{}) *Statement
- func (stmt *Statement) Limit(limit int) *Statement
- func (stmt *Statement) NamedArgs(v bool)
- func (stmt *Statement) NilField(field string, value interface{}) *Statement
- func (stmt *Statement) Offset(offset int) *Statement
- func (stmt *Statement) Ok() error
- func (stmt *Statement) Or(clause string, args ...interface{}) *Statement
- func (stmt *Statement) OrGroup(c func(s *Statement)) *Statement
- func (stmt *Statement) OrderBy(fields string, direction string) *Statement
- func (stmt *Statement) OuterJoin(table string, clause string, args ...interface{}) *Statement
- func (stmt *Statement) Returning(fields string) *Statement
- func (stmt *Statement) RightJoin(table string, clause string, args ...interface{}) *Statement
- func (stmt *Statement) Select(fields string) (string, []interface{})
- func (stmt *Statement) Update() (string, []interface{})
- func (stmt *Statement) Where(clause string, args ...interface{}) *Statement
- func (stmt *Statement) WhereGroup(c func(s *Statement)) *Statement
- type TableField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Statement ¶
type Statement struct {
// contains filtered or unexported fields
}
func (*Statement) And ¶
And will render an AND clause to the statement. This will render a WHERE clause, if it's called before any other condition-method.
func (*Statement) AndGroup ¶
AndGroup will render a group of conditions inside an AND clause to the statement. Will fallback to WHERE if it is the first condition of the statement
func (*Statement) NamedArgs ¶
NamedArgs will enable the use og named arguments in the SQL statement instead of index based.
func (*Statement) NilField ¶
NilField will OMIT adding the field to the SQL statement, if the passed value is nil.
func (*Statement) Or ¶
Or will render an OR clause to the statement. This will render a WHERE clause, if it's called before any other condition-method.
func (*Statement) OrGroup ¶
OrGroup will render a group of conditions inside an OR clause to the statement. Will fallback to WHERE if it is the first condition of the statement
func (*Statement) Where ¶
Where will render a WHERE clause to the statement. Subsequent calls to this method, for the same statement, will render an AND clause.
func (*Statement) WhereGroup ¶
WhereGroup will render a group of conditions inside a WHERE clause to the statement. Subsequent calls to this method, for the same statement, will render a grouped AND clause.
type TableField ¶
type TableField struct {
// contains filtered or unexported fields
}