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

Function NewMultiIndexedArrayInMemoryStore

factstore/factstore.go:737–742  ·  view source on GitHub ↗

NewMultiIndexedArrayInMemoryStore constructs a new MultiIndexedArrayInMemoryStore.

()

Source from the content-addressed store, hash-verified

735
736// NewMultiIndexedArrayInMemoryStore constructs a new MultiIndexedArrayInMemoryStore.
737func NewMultiIndexedArrayInMemoryStore() *MultiIndexedArrayInMemoryStore {
738 return &MultiIndexedArrayInMemoryStore{
739 InMemoryStore: NewInMemoryStore[map[uint16]map[uint64]map[uint64][]*ast.Atom](),
740 count: 0,
741 }
742}
743
744func (s *MultiIndexedArrayInMemoryStore) getFactsOfFirstVariable(a ast.Atom, fn func(ast.Atom) error) error {
745 for _, shard := range s.shardsByPredicate[a.Predicate][0] {

Callers 5

evalStrataMethod · 0.92
evalMethod · 0.92
NewTeeingStoreFunction · 0.85
TestAddContainsRemoveFunction · 0.85

Calls 1

NewInMemoryStoreFunction · 0.85

Tested by 1

TestAddContainsRemoveFunction · 0.68