DeletePredsForNs deletes the predicate information for the namespace from the schema.
(delNs uint64)
| 151 | |
| 152 | // DeletePredsForNs deletes the predicate information for the namespace from the schema. |
| 153 | func (s *state) DeletePredsForNs(delNs uint64) { |
| 154 | if s == nil { |
| 155 | return |
| 156 | } |
| 157 | s.Lock() |
| 158 | defer s.Unlock() |
| 159 | for pred := range s.predicate { |
| 160 | ns := x.ParseNamespace(pred) |
| 161 | if ns == delNs { |
| 162 | delete(s.predicate, pred) |
| 163 | delete(s.mutSchema, pred) |
| 164 | } |
| 165 | } |
| 166 | for typ := range s.types { |
| 167 | ns := x.ParseNamespace(typ) |
| 168 | if ns == delNs { |
| 169 | delete(s.types, typ) |
| 170 | } |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | func logUpdate(schema *pb.SchemaUpdate, pred string) string { |
| 175 | if schema == nil { |
no test coverage detected