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

Function IsPreDefinedType

x/keys.go:922–925  ·  view source on GitHub ↗

IsPreDefinedType returns true only if the typ has been defined by dgraph internally. For example, `dgraph.graphql` or ACL types are defined in the initial internal types. We reserve `dgraph.` as the namespace for the types/predicates we may create in future. So, users are not allowed to create a pr

(typ string)

Source from the content-addressed store, hash-verified

920//
921// Pre-defined types are subset of reserved types.
922func IsPreDefinedType(typ string) bool {
923 _, ok := preDefinedTypeMap[ParseAttr(typ)]
924 return ok
925}
926
927// isReservedName returns true if the given name is prefixed with `dgraph.`
928func isReservedName(name string) bool {

Callers 3

alterMethod · 0.92
IsPreDefTypeChangedFunction · 0.92

Calls 1

ParseAttrFunction · 0.85

Tested by

no test coverage detected