Versions in this module Expand all Collapse all v0 v0.2.0 Jan 15, 2023 Changes in this version + var ErrParsed = errors.New("text parsed") + var PrimitiveTypes = []Token + var PrimitiveTypesAndKey = append(PrimitiveTypes, TKey) + func IsPrimitive(t Token) bool + func IsPrimitiveOrKey(t Token) bool + func Link(n *Node) + type CompiledQuery struct + func Compile(query string, params ...interface{}) (CompiledQuery, error) + func MustCompile(query string, params ...interface{}) CompiledQuery + func (pq CompiledQuery) Discard() + func (pq CompiledQuery) MarshalBSON() ([]byte, error) + type Expression struct + L []byte + LT ValueType + Links *[]*Expression + Op string + R []byte + RT ValueType + S pos + T pos + func (e *Expression) FindKey() []byte + func (e *Expression) String() string + type Node struct + In *NodeContext + L *Expression + LN *Node + LRoot bool + Op string + Parent *Node + R *Expression + RN *Node + func Reduce(n *Node) *Node + func (n *Node) FixParent() + func (n *Node) LocalRoot() (*Node, bool) + func (n *Node) Replace(on, nn *Node) + func (n *Node) ReplaceNode(nn *Node) + func (n *Node) Root() *Node + func (n *Node) SetNextExpression(ne *Expression) + func (n *Node) SetNextNode(nn *Node) + func (n *Node) String() string + type NodeContext struct + Field []byte + type Parser struct + func NewParser(s *Scanner) *Parser + func (p *Parser) Parse() (*Node, error) + type PreparedQuery struct + func MustPrepare(query string) *PreparedQuery + func Prepare(query string) (*PreparedQuery, error) + func (enc PreparedQuery) Compile(params ...interface{}) (CompiledQuery, error) + type Scanner struct + func NewScanner(r io.Reader) *Scanner + func (s *Scanner) Next() error + func (s *Scanner) Position() (int, int) + func (s *Scanner) Token() (Token, []byte) + type Token uint + const TBool + const TComma + const TKey + const TNumber + const TOp + const TParentheses + const TRegex + const TString + type ValueType uint + const VTArray + const VTBool + const VTDate + const VTFloat + const VTInteger + const VTKey + const VTObjectID + const VTRegex + const VTString