EstimateFactCount returns the number of facts.
()
| 148 | |
| 149 | // EstimateFactCount returns the number of facts. |
| 150 | func (s SimpleInMemoryStore) EstimateFactCount() int { |
| 151 | c := 0 |
| 152 | for _, m := range s.shardsByPredicate { |
| 153 | c += len(m) |
| 154 | } |
| 155 | return c |
| 156 | } |
| 157 | |
| 158 | // Add implements the FactStore interface by adding the fact to the backing map. |
| 159 | func (s SimpleInMemoryStore) Add(a ast.Atom) bool { |
no outgoing calls