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

Function ParseNamespaceAttr

x/keys.go:96–99  ·  view source on GitHub ↗

ParseNamespaceAttr returns the namespace and attr from the given value.

(attr string)

Source from the content-addressed store, hash-verified

94
95// ParseNamespaceAttr returns the namespace and attr from the given value.
96func ParseNamespaceAttr(attr string) (uint64, string) {
97 splits := strings.SplitN(attr, NsSeparator, 2)
98 return strToUint(splits[0]), splits[1]
99}
100
101func ParseNamespaceBytes(attr string) ([]byte, string) {
102 splits := strings.SplitN(attr, NsSeparator, 2)

Callers 15

filterTabletsFunction · 0.92
SubscribeForAclUpdatesFunction · 0.92
printKeysFunction · 0.92
toSchemaFunction · 0.92
toTypeFunction · 0.92
processReqChMethod · 0.92
TestEmptyTypeSchemaFunction · 0.92
AuthorizePredicateMethod · 0.92
verifyTypesFunction · 0.92
filterTypesForNamespaceFunction · 0.92

Calls 1

strToUintFunction · 0.70

Tested by 4

TestEmptyTypeSchemaFunction · 0.74
TestNameSpaceFunction · 0.68
TestJsonMarshalFunction · 0.68
TestNsSeparatorFunction · 0.68