Merge adds all facts from other to this fact store.
(other ReadOnlyFactStore)
| 520 | |
| 521 | // Merge adds all facts from other to this fact store. |
| 522 | func (s IndexedInMemoryStore) Merge(other ReadOnlyFactStore) { |
| 523 | for _, pred := range other.ListPredicates() { |
| 524 | other.GetFacts(ast.NewQuery(pred), func(fact ast.Atom) error { |
| 525 | s.Add(fact) |
| 526 | return nil |
| 527 | }) |
| 528 | } |
| 529 | } |
| 530 | |
| 531 | // ListPredicates returns a list of predicates. |
| 532 | func (s IndexedInMemoryStore) ListPredicates() []ast.PredicateSym { |
nothing calls this directly
no test coverage detected