Namespaces returns the active namespaces based on the current types.
()
| 135 | |
| 136 | // Namespaces returns the active namespaces based on the current types. |
| 137 | func (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. |
| 153 | func (s *state) DeletePredsForNs(delNs uint64) { |
no test coverage detected