#NEWLINE# def returning_clause( self , stmt , returning_cols ) : #NEWLINE# #INDENT# columns = [ ] #NEWLINE# binds = [ ] #NEWLINE# for ( i , column ) in enumerate ( expression . _select_iterables ( returning_cols ) ) : #NEWLINE# #INDENT# if column . type . _has_column_expression : #NEWLINE# #INDENT# col_expr = column . type . column_expression ( column ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# col_expr = column #NEWLINE# #UNINDENT# outparam = sql . outparam ( ( 'ret_%d' % i ) , type_ = column . type ) #NEWLINE# self . binds [ outparam . key ] = outparam #NEWLINE# binds . append ( self . bindparam_string ( self . _truncate_bindparam ( outparam ) ) ) #NEWLINE# columns . append ( self . process ( col_expr , within_columns_clause = False ) ) #NEWLINE# self . result_map [ outparam . key ] = ( outparam . key , ( column , getattr ( column , 'name' , None ) , getattr ( column , 'key' , None ) ) , column . type ) #NEWLINE# #UNINDENT# return ( ( ( 'RETURNING ' + ', ' . join ( columns ) ) + ' INTO ' ) + ', ' . join ( binds ) )