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

Function IsReservedPredicate

x/keys.go:846–848  ·  view source on GitHub ↗

IsReservedPredicate returns true if the predicate is reserved for internal usage, i.e., prefixed with `dgraph.`. We reserve `dgraph.` as the namespace for the types/predicates we may create in future. So, users are not allowed to create a predicate under this namespace. Hence, we should always defi

(pred string)

Source from the content-addressed store, hash-verified

844// 2. dgraph.blah (reserved = true, pre_defined = false)
845// 3. person.name (reserved = false, pre_defined = false)
846func IsReservedPredicate(pred string) bool {
847 return isReservedName(ParseAttr(pred))
848}
849
850// IsPreDefinedPredicate returns true only if the predicate has been defined by dgraph internally
851// in the initial schema. These are not allowed to be dropped, as well as any schema update which

Callers 9

InformMethod · 0.92
ShouldServeMethod · 0.92
movePredicateMethod · 0.92
chooseTabletMethod · 0.92
shardForMethod · 0.92
toCDCEventFunction · 0.92
proposeAndWaitMethod · 0.92

Calls 2

isReservedNameFunction · 0.85
ParseAttrFunction · 0.85

Tested by

no test coverage detected