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

Function IsPreDefinedPredicate

x/keys.go:861–865  ·  view source on GitHub ↗

IsPreDefinedPredicate returns true only if the predicate has been defined by dgraph internally in the initial schema. These are not allowed to be dropped, as well as any schema update which is different than the initial internal schema is also not allowed for these. For example, `dgraph.type` or ACL

(pred string)

Source from the content-addressed store, hash-verified

859//
860// Pre-defined predicates are subset of reserved predicates.
861func IsPreDefinedPredicate(pred string) bool {
862 pred = ParseAttr(pred)
863 _, ok := starAllPredicateMap[strings.ToLower(pred)]
864 return ok || IsAclPredicate(pred) || IsOtherReservedPredicate(pred)
865}
866
867// IsAclPredicate returns true if the predicate is in the list of reserved
868// predicates for the ACL feature.

Callers 3

alterMethod · 0.92

Calls 3

ParseAttrFunction · 0.85
IsAclPredicateFunction · 0.85
IsOtherReservedPredicateFunction · 0.85

Tested by

no test coverage detected