Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrParsed = errors.New("text parsed")
View Source
var PrimitiveTypesAndKey = append(PrimitiveTypes, TKey)
Functions ¶
func IsPrimitive ¶
func IsPrimitiveOrKey ¶
Types ¶
type CompiledQuery ¶
type CompiledQuery struct {
// contains filtered or unexported fields
}
func Compile ¶
func Compile(query string, params ...interface{}) (CompiledQuery, error)
func MustCompile ¶
func MustCompile(query string, params ...interface{}) CompiledQuery
func (CompiledQuery) Discard ¶
func (pq CompiledQuery) Discard()
func (CompiledQuery) MarshalBSON ¶
func (pq CompiledQuery) MarshalBSON() ([]byte, error)
type Expression ¶
type Expression struct { Op string L []byte LT ValueType R []byte RT ValueType S, T pos Links *[]*Expression }
func (*Expression) FindKey ¶
func (e *Expression) FindKey() []byte
func (*Expression) String ¶
func (e *Expression) String() string
type Node ¶
type Node struct { Parent *Node In *NodeContext Op string L, R *Expression LN, RN *Node LRoot bool }
func (*Node) LocalRoot ¶
LocalRoot finds local root (parent node for parentheses) and flag if we found local root from left side.
func (*Node) ReplaceNode ¶
func (*Node) SetNextExpression ¶
func (n *Node) SetNextExpression(ne *Expression)
func (*Node) SetNextNode ¶
type NodeContext ¶
type NodeContext struct {
Field []byte
}
type PreparedQuery ¶
type PreparedQuery struct {
// contains filtered or unexported fields
}
func MustPrepare ¶
func MustPrepare(query string) *PreparedQuery
func Prepare ¶
func Prepare(query string) (*PreparedQuery, error)
func (PreparedQuery) Compile ¶
func (enc PreparedQuery) Compile(params ...interface{}) (CompiledQuery, error)
Click to show internal directories.
Click to hide internal directories.