def find_all(self, props): # Returns list of all items in result set query = self.create_query(props) cursor = db.find(self._table, query) results = [] for item in cursor: results.append(item) return results
def find_one(self, props): # Returns the first item in result iterator query = self.create_query(props) cursor = db.find(self._table, query) return next(cursor)