Make MemoryStore implement the new query interface