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

Method Merge

factstore/temporal.go:475–482  ·  view source on GitHub ↗

Merge merges another store into this one.

(other ReadOnlyFactStore)

Source from the content-addressed store, hash-verified

473
474// Merge merges another store into this one.
475func (a *TemporalFactStoreAdapter) Merge(other ReadOnlyFactStore) {
476 for _, pred := range other.ListPredicates() {
477 other.GetFacts(ast.NewQuery(pred), func(fact ast.Atom) error {
478 a.Add(fact)
479 return nil
480 })
481 }
482}
483
484// TeeingTemporalStore is an implementation of TemporalFactStore that directs all writes to
485// an output store, while distributing reads over a read-only base store and the output store.

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