MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / Namespaces

Method Namespaces

schema/schema.go:137–150  ·  view source on GitHub ↗

Namespaces returns the active namespaces based on the current types.

()

Source from the content-addressed store, hash-verified

135
136// Namespaces returns the active namespaces based on the current types.
137func (s *state) Namespaces() map[uint64]struct{} {
138 if s == nil {
139 return nil
140 }
141
142 s.RLock()
143 defer s.RUnlock()
144
145 ns := make(map[uint64]struct{})
146 for typ := range s.types {
147 ns[x.ParseNamespace(typ)] = struct{}{}
148 }
149 return ns
150}
151
152// DeletePredsForNs deletes the predicate information for the namespace from the schema.
153func (s *state) DeletePredsForNs(delNs uint64) {

Callers 3

DeleteNamespaceMethod · 0.80
RefreshACLsFunction · 0.80
ListNamespacesMethod · 0.80

Calls 3

ParseNamespaceFunction · 0.92
RLockMethod · 0.80
RUnlockMethod · 0.80

Tested by

no test coverage detected