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

Function processContainExpression

engine/engine.go:709–722  ·  view source on GitHub ↗
(row map[string]ValueInterface, containExpression *ast.ContainExpression)

Source from the content-addressed store, hash-verified

707}
708
709func processContainExpression(row map[string]ValueInterface, containExpression *ast.ContainExpression) (bool, error) {
710 valueLeft, err := getTifierValue(containExpression.Left, row)
711 if err != nil {
712 return false, err
713 }
714
715 result, err := ifValueInterfaceInArray(containExpression.Right, valueLeft)
716
717 if containExpression.Contains {
718 return result, err
719 }
720
721 return !result, err
722}
723
724func ifValueInterfaceInArray(array []ast.Anonymitifier, valueLeft ValueInterface) (bool, error) {
725 for _, expectedValue := range array {

Callers 1

isFulfillingFiltersFunction · 0.85

Calls 2

getTifierValueFunction · 0.85
ifValueInterfaceInArrayFunction · 0.85

Tested by

no test coverage detected