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

Function NewTemporalStore

factstore/temporal.go:110–120  ·  view source on GitHub ↗

NewTemporalStore creates a new TemporalStore.

(opts ...TemporalStoreOption)

Source from the content-addressed store, hash-verified

108
109// NewTemporalStore creates a new TemporalStore.
110func NewTemporalStore(opts ...TemporalStoreOption) *TemporalStore {
111 s := &TemporalStore{
112 facts: make(map[ast.PredicateSym]map[uint64]*IntervalTree),
113 atoms: make(map[uint64]ast.Atom),
114 maxIntervalsPerAtom: DefaultMaxIntervalsPerAtom,
115 }
116 for _, opt := range opts {
117 opt(s)
118 }
119 return s
120}
121
122// Add adds a temporal fact to the store.
123// Returns (true, nil) if added, (false, nil) if duplicate, (false, error) if limit exceeded.

Calls

no outgoing calls