Documentation ¶
Overview ¶
Package parser contains expression parser for search parameter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compare ¶
type Condition ¶
type Condition struct { Operand *ConditionOperand ` @@` Not *Condition `| "NOT" @@` }
type ConditionOperand ¶
type ConditionOperand struct { Operand *Operand `@@` ConditionRHS *ConditionRHS `[ @@ ]` }
func (*ConditionOperand) ExprQuery ¶
func (o *ConditionOperand) ExprQuery() bson.M
func (*ConditionOperand) GetFields ¶
func (o *ConditionOperand) GetFields() []string
func (*ConditionOperand) NotExprQuery ¶
func (o *ConditionOperand) NotExprQuery() bson.M
func (*ConditionOperand) NotQuery ¶
func (o *ConditionOperand) NotQuery() bson.M
func (*ConditionOperand) Query ¶
func (o *ConditionOperand) Query() bson.M
type ConditionRHS ¶
type ConditionRHS struct { Compare *Compare ` @@` Like *Like `| "LIKE" @@` NotLike *NotLike `| "NOT" "LIKE" @@` Contains *Contains `| "CONTAINS" @@` NotContains *NotContains `| "NOT" "CONTAINS" @@` }
func (*ConditionRHS) NotExprQuery ¶
func (r *ConditionRHS) NotExprQuery(op string) bson.M
func (*ConditionRHS) NotQuery ¶
func (r *ConditionRHS) NotQuery() bson.M
func (*ConditionRHS) Query ¶
func (r *ConditionRHS) Query() bson.M
type Expression ¶
type Expression struct {
Or []*OrCondition `@@ { "OR" @@ }`
}
func (*Expression) ExprQuery ¶
func (e *Expression) ExprQuery() bson.M
func (*Expression) GetFields ¶
func (e *Expression) GetFields() []string
func (*Expression) Query ¶
func (e *Expression) Query() bson.M
type MongoQuery ¶
type NotContains ¶
type NotContains struct {
Operand *Operand `@@`
}
func (*NotContains) Query ¶
func (l *NotContains) Query() bson.M
type OrCondition ¶
type OrCondition struct {
And []*Condition `@@ { "AND" @@ }`
}
func (*OrCondition) ExprQuery ¶
func (c *OrCondition) ExprQuery() bson.M
func (*OrCondition) GetFields ¶
func (c *OrCondition) GetFields() []string
func (*OrCondition) Query ¶
func (c *OrCondition) Query() bson.M
Click to show internal directories.
Click to hide internal directories.