def get_cursor_list(conditions, trans): cur_list = [] for index, value in conditions: cursor = Cursor(_indices[index], trans and trans.txn) if type(value) == tuple: cursor.set_range(value[0], value[1]) else: cursor.set(value) cur_list.append(cursor) return cur_list
def get_cursor_list(self, conditions): cur_list = [] for index, value in conditions: cursor = Cursor(self._indices[index].db, self._indices[index].name) if isinstance(value, (list, tuple)): reversed = (len(value) == 3 and value[2]) cursor.set_range(value[0], value[1]) if reversed: cursor.reverse() else: cursor.set(value) cur_list.append(cursor) return cur_list
def get_children(self, container_id): cursor = Cursor(self._itemdb, '_pid') cursor.set_scope(container_id) cursor.set_range(None, None) return cursor