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

Function isFulfillingFilters

engine/engine.go:672–686  ·  view source on GitHub ↗
(row map[string]ValueInterface, expressionTree ast.Expression, commandName string)

Source from the content-addressed store, hash-verified

670}
671
672func isFulfillingFilters(row map[string]ValueInterface, expressionTree ast.Expression, commandName string) (bool, error) {
673 switch mappedExpression := expressionTree.(type) {
674 case *ast.OperationExpression:
675 return processOperationExpression(row, mappedExpression, commandName)
676 case *ast.BooleanExpression:
677 return processBooleanExpression(mappedExpression)
678 case *ast.ConditionExpression:
679 return processConditionExpression(row, mappedExpression, commandName)
680 case *ast.ContainExpression:
681 return processContainExpression(row, mappedExpression)
682
683 default:
684 return false, &UnsupportedExpressionTypeError{commandName: commandName, variable: fmt.Sprintf("%s", mappedExpression)}
685 }
686}
687
688func processConditionExpression(row map[string]ValueInterface, conditionExpression *ast.ConditionExpression, commandName string) (bool, error) {
689 valueLeft, err := getTifierValue(conditionExpression.Left, row)

Callers 4

updateTableMethod · 0.85
getFilteredTableMethod · 0.85
joinTablesMethod · 0.85

Calls 4

processBooleanExpressionFunction · 0.85
processContainExpressionFunction · 0.85

Tested by

no test coverage detected