Contains implementation that checks all stores.
(atom ast.Atom)
| 233 | |
| 234 | // Contains implementation that checks all stores. |
| 235 | func (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. |
| 245 | func (s MergedStore) GetFacts(query ast.Atom, cb func(ast.Atom) error) error { |