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

Function NewIndexedInMemoryStore

factstore/factstore.go:394–398  ·  view source on GitHub ↗

NewIndexedInMemoryStore constructs a new IndexedInMemoryStore.

()

Source from the content-addressed store, hash-verified

392
393// NewIndexedInMemoryStore constructs a new IndexedInMemoryStore.
394func NewIndexedInMemoryStore() IndexedInMemoryStore {
395 return IndexedInMemoryStore{
396 NewInMemoryStore[map[uint64]map[uint64]ast.Atom](),
397 }
398}
399
400func (s IndexedInMemoryStore) getFactsOfFirstVariable(a ast.Atom, fn func(ast.Atom) error) error {
401 for _, shard := range s.shardsByPredicate[a.Predicate] {

Callers 2

BenchmarkJoinFunction · 0.92
TestAddContainsRemoveFunction · 0.85

Calls 1

NewInMemoryStoreFunction · 0.85

Tested by 2

BenchmarkJoinFunction · 0.74
TestAddContainsRemoveFunction · 0.68