Documentation ¶
Index ¶
- type Builder
- func And(cond ...Builder) Builder
- func Equal(column string, value interface{}) Builder
- func GreaterOrEqual(column string, value interface{}) Builder
- func GreaterThen(column string, value interface{}) Builder
- func LowerOrEqual(column string, value interface{}) Builder
- func LowerThen(column string, value interface{}) Builder
- func NotEqual(column string, value interface{}) Builder
- func Or(cond ...Builder) Builder
- func Raw(query string, value ...interface{}) Builder
- type PrepareFunc
- type Query
- type Statement
- func (s *Statement) From(table string) *Statement
- func (s *Statement) Join(table, on string) *Statement
- func (s *Statement) Prepare(q Query) error
- func (s *Statement) Return(columns ...string) *Statement
- func (s *Statement) Values(values ...interface{}) *Statement
- func (s *Statement) Where(conditions interface{}, values ...interface{}) *Statement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
Builder defines a interface to
func GreaterOrEqual ¶
GreaterOrEqual greater or equal condition
func GreaterThen ¶
GreaterThen greater then condition
func LowerOrEqual ¶
LowerOrEqual lower or equal condition
type PrepareFunc ¶
PrepareFunc function to assemble queries
func (PrepareFunc) Prepare ¶
func (p PrepareFunc) Prepare(query Query) error
Prepare creates the chain to build the query
type Query ¶
type Query interface { WriteString(string) (int, error) String() string Reset() WriteValue(v ...interface{}) (err error) Value() []interface{} }
Query with string builder
type Statement ¶
type Statement struct { Type string Table string Columns []string WhereCond Builder JoinTable []Builder Data []interface{} ReturnColumns []string }
Statement represents a sql query
Click to show internal directories.
Click to hide internal directories.