func bubbleUpJSONContext(c *expressionCompiler) func(exp criteria.Expression) bool {
	return func(exp criteria.Expression) bool {
		switch t := exp.(type) {
		case *criteria.FieldExpression:
			_, isJSONField := c.getFieldName(t.FieldName)
			if isJSONField {
				t.SetAnnotation(jsonAnnotation, true)
			}
		case *criteria.EqualsExpression:
			if t.Left().Annotation(jsonAnnotation) == true || t.Right().Annotation(jsonAnnotation) == true {
				t.SetAnnotation(jsonAnnotation, true)
			}
		case *criteria.SubstringExpression:
			if t.Left().Annotation(jsonAnnotation) == true || t.Right().Annotation(jsonAnnotation) == true {
				t.SetAnnotation(jsonAnnotation, true)
			}
		case *criteria.NotExpression:
			if t.Left().Annotation(jsonAnnotation) == true || t.Right().Annotation(jsonAnnotation) == true {
				t.SetAnnotation(jsonAnnotation, true)
			}
		}
		return true
	}
}
// mark expression tree nodes that reference json fields
mark expression tree nodes that reference json fields
// mark expression tree nodes that reference json fields
func bubbleUpJSONContext(c *expressionCompiler) func(exp criteria.Expression) bool {
	return func(exp criteria.Expression) bool {
		switch t := exp.(type) {
		case *criteria.FieldExpression:
			_, isJSONField := c.getFieldName(t.FieldName)
			if isJSONField {
				t.SetAnnotation(jsonAnnotation, true)
			}
		case *criteria.EqualsExpression:
			if t.Left().Annotation(jsonAnnotation) == true || t.Right().Annotation(jsonAnnotation) == true {
				t.SetAnnotation(jsonAnnotation, true)
			}
		case *criteria.SubstringExpression:
			if t.Left().Annotation(jsonAnnotation) == true || t.Right().Annotation(jsonAnnotation) == true {
				t.SetAnnotation(jsonAnnotation, true)
			}
		case *criteria.NotExpression:
			if t.Left().Annotation(jsonAnnotation) == true || t.Right().Annotation(jsonAnnotation) == true {
				t.SetAnnotation(jsonAnnotation, true)
			}
		}
		return true
	}
}
func bubbleUpJSONContext ( c * expressionCompiler ) func ( exp criteria . Expression ) bool { return func ( exp criteria . Expression ) bool { switch t := exp . ( type ) { case * criteria . FieldExpression : _ , isJSONField := c . getFieldName ( t . FieldName ) if isJSONField { t . SetAnnotation ( jsonAnnotation , true ) } case * criteria . EqualsExpression : if t . Left ( ) . Annotation ( jsonAnnotation ) == true || t . Right ( ) . Annotation ( jsonAnnotation ) == true { t . SetAnnotation ( jsonAnnotation , true ) } case * criteria . SubstringExpression : if t . Left ( ) . Annotation ( jsonAnnotation ) == true || t . Right ( ) . Annotation ( jsonAnnotation ) == true { t . SetAnnotation ( jsonAnnotation , true ) } case * criteria . NotExpression : if t . Left ( ) . Annotation ( jsonAnnotation ) == true || t . Right ( ) . Annotation ( jsonAnnotation ) == true { t . SetAnnotation ( jsonAnnotation , true ) } } return true } }
mark expression tree nodes that reference json fields
mark expression tree nodes that reference json fields