Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TYPES = map[string]WhereType{ "__root__": { Key: "__root__", }, "__field__": { Key: "__field__", }, "and": { Key: "and", Operator: WhereOperator{ SQL: "AND", }, }, "or": { Key: "or", Operator: WhereOperator{ SQL: "OR", }, }, "eq": { Key: "eq", Operator: WhereOperator{ SQL: "%s = ?", }, }, "neq": { Key: "neq", Operator: WhereOperator{ SQL: "%s <> ?", }, }, "gt": { Key: "gt", Operator: WhereOperator{ SQL: "%s > ?", }, }, "gte": { Key: "gte", Operator: WhereOperator{ SQL: "%s >= ?", }, }, "lt": { Key: "lt", Operator: WhereOperator{ SQL: "%s < ?", }, }, "lte": { Key: "lte", Operator: WhereOperator{ SQL: "%s <= ?", }, }, "between": { Key: "between", Operator: WhereOperator{ SQL: "%s BETWEEN ? AND ?", }, }, "in": { Key: "in", Operator: WhereOperator{ SQL: "%s IN ?", }, }, "nin": { Key: "nin", Operator: WhereOperator{ SQL: "%s NOT IN ?", }, }, "like": { Key: "like", Operator: WhereOperator{ SQL: "%s LIKE ?", }, }, "nlike": { Key: "nlike", Operator: WhereOperator{ SQL: "%s NOT LIKE ?", }, }, }
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Query ¶
func (*Query) AppendQuoted ¶
func (*Query) SQLAppendAND ¶
func (q *Query) SQLAppendAND()
func (*Query) SQLAppendOR ¶
func (q *Query) SQLAppendOR()
type Where ¶
type Where struct { Root *Node // contains filtered or unexported fields }
func NewFromMap ¶
func (*Where) GetWhereType ¶
type WhereOperator ¶
type WhereOperator struct {
SQL string
}
Click to show internal directories.
Click to hide internal directories.