def fetchone(self): row = self.result.fetchone() if row is not None: handle = ffi.new_handle(Row(row)) self.current_row_handler = handle else: handle = ffi.NULL return handle
def db_get_cursor(): cursor = Cursor() handle = ffi.new_handle(cursor) handles.append(handle) return handle