MCPcopy
hub / github.com/dgraph-io/dgraph / ineqMatch

Function ineqMatch

worker/stringfilter.go:76–90  ·  view source on GitHub ↗
(value types.Val, filter *stringFilter)

Source from the content-addressed store, hash-verified

74}
75
76func ineqMatch(value types.Val, filter *stringFilter) bool {
77 if filter.funcName == eq {
78 for _, v := range filter.eqVals {
79 if types.CompareVals(filter.funcName, value, v) {
80 return true
81 }
82 }
83 return false
84 } else if filter.funcName == between {
85 return types.CompareVals("ge", value, filter.eqVals[0]) &&
86 types.CompareVals("le", value, filter.eqVals[1])
87 }
88
89 return types.CompareVals(filter.funcName, value, filter.eqVals[0])
90}
91
92func tokenizeValue(value types.Val, filter *stringFilter) []string {
93 tokenizer, found := tok.GetTokenizer(filter.tokName)

Callers

nothing calls this directly

Calls 1

CompareValsFunction · 0.92

Tested by

no test coverage detected