Merge adds all facts from other to this fact store.
(other ReadOnlyFactStore)
| 196 | |
| 197 | // Merge adds all facts from other to this fact store. |
| 198 | func (s SimpleInMemoryStore) Merge(other ReadOnlyFactStore) { |
| 199 | for _, pred := range other.ListPredicates() { |
| 200 | other.GetFacts(ast.NewQuery(pred), func(fact ast.Atom) error { |
| 201 | s.Add(fact) |
| 202 | return nil |
| 203 | }) |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | // MergedStore is an implementation of FactStore that merges multiple |
| 208 | // fact stores. It dispatches lookup requests to all of them but sending |
nothing calls this directly
no test coverage detected