MCPcopy Create free account
hub / github.com/LissaGreense/GO4SQL / processOperationExpression

Function processOperationExpression

engine/engine.go:737–759  ·  view source on GitHub ↗
(row map[string]ValueInterface, operationExpression *ast.OperationExpression, commandName string)

Source from the content-addressed store, hash-verified

735}
736
737func 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
761func processBooleanExpression(booleanExpression *ast.BooleanExpression) (bool, error) {
762 if booleanExpression.Boolean.Literal == token.TRUE {

Callers 1

isFulfillingFiltersFunction · 0.85

Calls 1

isFulfillingFiltersFunction · 0.85

Tested by

no test coverage detected