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

Method Merge

factstore/factstore.go:932–939  ·  view source on GitHub ↗

Merge adds all facts from other to this fact store.

(other ReadOnlyFactStore)

Source from the content-addressed store, hash-verified

930
931// Merge adds all facts from other to this fact store.
932func (s *MultiIndexedArrayInMemoryStore) Merge(other ReadOnlyFactStore) {
933 for _, pred := range other.ListPredicates() {
934 other.GetFacts(ast.NewQuery(pred), func(fact ast.Atom) error {
935 s.Add(fact)
936 return nil
937 })
938 }
939}
940
941// ListPredicates returns a list of predicates.
942func (s *MultiIndexedArrayInMemoryStore) 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