MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / isValidFuncName

Function isValidFuncName

query/query.go:2751–2758  ·  view source on GitHub ↗

isValidFuncName checks if fn passed is valid keyword.

(f string)

Source from the content-addressed store, hash-verified

2749
2750// isValidFuncName checks if fn passed is valid keyword.
2751func isValidFuncName(f string) bool {
2752 switch f {
2753 case "anyofterms", "allofterms", "val", "regexp", "anyoftext", "alloftext", "ngram",
2754 "has", "uid", "uid_in", "anyof", "allof", "type", "match", "similar_to":
2755 return true
2756 }
2757 return isInequalityFn(f) || types.IsGeoFunc(f)
2758}
2759
2760func isInequalityFn(f string) bool {
2761 switch f {

Callers 2

filterCopyFunction · 0.85
newGraphFunction · 0.85

Calls 2

IsGeoFuncFunction · 0.92
isInequalityFnFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…