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

Method Contains

factstore/factstore.go:235–242  ·  view source on GitHub ↗

Contains implementation that checks all stores.

(atom ast.Atom)

Source from the content-addressed store, hash-verified

233
234// Contains implementation that checks all stores.
235func (s MergedStore) Contains(atom ast.Atom) bool {
236 for _, store := range s.readStore {
237 if store.Contains(atom) {
238 return true
239 }
240 }
241 return s.writeStore.Contains(atom)
242}
243
244// GetFacts implementation that dispatches to all stores.
245func (s MergedStore) GetFacts(query ast.Atom, cb func(ast.Atom) error) error {

Callers 3

AddMethod · 0.95
TestMergedAddContainsFunction · 0.95
TestMergedMergeFunction · 0.95

Calls 1

ContainsMethod · 0.65

Tested by 2

TestMergedAddContainsFunction · 0.76
TestMergedMergeFunction · 0.76