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

Method handleCompareScalarFunction

worker/task.go:1222–1238  ·  view source on GitHub ↗
(ctx context.Context, arg funcArgs)

Source from the content-addressed store, hash-verified

1220}
1221
1222func (qs *queryState) handleCompareScalarFunction(ctx context.Context, arg funcArgs) error {
1223 attr := arg.q.Attr
1224 if ok := schema.State().HasCount(ctx, attr); !ok {
1225 return errors.Errorf("Need @count directive in schema for attr: %s for fn: %s at root",
1226 x.ParseAttr(attr), arg.srcFn.fname)
1227 }
1228 counts := arg.srcFn.threshold
1229 cp := countParams{
1230 fn: arg.srcFn.fname,
1231 counts: counts,
1232 attr: attr,
1233 gid: arg.gid,
1234 readTs: arg.q.ReadTs,
1235 reverse: arg.q.Reverse,
1236 }
1237 return qs.evaluate(cp, arg.out)
1238}
1239
1240func (qs *queryState) handleRegexFunction(ctx context.Context, arg funcArgs) error {
1241 span := trace.SpanFromContext(ctx)

Callers 1

helpProcessTaskMethod · 0.95

Calls 5

evaluateMethod · 0.95
StateFunction · 0.92
ParseAttrFunction · 0.92
HasCountMethod · 0.80
ErrorfMethod · 0.45

Tested by

no test coverage detected