#NEWLINE# def order_modified_iter( cursor , trim , sentinel ) : #NEWLINE# #INDENT# "\n    Yields blocks of rows from a cursor. We use this iterator in the special\n    case when extra output columns have been added to support ordering\n    requirements. We must trim those extra columns before anything else can use\n    the results, since they're only needed to make the SQL valid.\n    " #NEWLINE# for rows in iter ( ( lambda : cursor . fetchmany ( GET_ITERATOR_CHUNK_SIZE ) ) , sentinel ) : #NEWLINE# #INDENT# ( yield [ r [ : ( - rows ) ] for r in rows ] )