(row map[string]ValueInterface, operationExpression *ast.OperationExpression, commandName string)
| 735 | } |
| 736 | |
| 737 | func processOperationExpression(row map[string]ValueInterface, operationExpression *ast.OperationExpression, commandName string) (bool, error) { |
| 738 | if operationExpression.Operation.Type == token.AND { |
| 739 | left, err := isFulfillingFilters(row, operationExpression.Left, commandName) |
| 740 | if !left { |
| 741 | return left, err |
| 742 | } |
| 743 | right, err := isFulfillingFilters(row, operationExpression.Right, commandName) |
| 744 | |
| 745 | return left && right, err |
| 746 | } |
| 747 | |
| 748 | if operationExpression.Operation.Type == token.OR { |
| 749 | left, err := isFulfillingFilters(row, operationExpression.Left, commandName) |
| 750 | if left { |
| 751 | return left, err |
| 752 | } |
| 753 | right, err := isFulfillingFilters(row, operationExpression.Right, commandName) |
| 754 | |
| 755 | return left || right, err |
| 756 | } |
| 757 | |
| 758 | return false, &UnsupportedOperationTokenError{operationExpression.Operation.Literal} |
| 759 | } |
| 760 | |
| 761 | func processBooleanExpression(booleanExpression *ast.BooleanExpression) (bool, error) { |
| 762 | if booleanExpression.Boolean.Literal == token.TRUE { |
no test coverage detected