implement query interface for MongoDB driver