MCPcopy
hub / github.com/google/mangle / Merge

Method Merge

factstore/factstore.go:705–712  ·  view source on GitHub ↗

Merge adds all facts from other to this fact store.

(other ReadOnlyFactStore)

Source from the content-addressed store, hash-verified

703
704// Merge adds all facts from other to this fact store.
705func (s MultiIndexedInMemoryStore) Merge(other ReadOnlyFactStore) {
706 for _, pred := range other.ListPredicates() {
707 other.GetFacts(ast.NewQuery(pred), func(fact ast.Atom) error {
708 s.Add(fact)
709 return nil
710 })
711 }
712}
713
714// ListPredicates returns a list of predicates.
715func (s MultiIndexedInMemoryStore) ListPredicates() []ast.PredicateSym {

Callers

nothing calls this directly

Calls 4

AddMethod · 0.95
NewQueryFunction · 0.92
ListPredicatesMethod · 0.65
GetFactsMethod · 0.65

Tested by

no test coverage detected