Project

General

Profile

« Previous | Next » 

Revision 3524

sql_io.py: Added func_wrapper_exception_handler()

View differences:

lib/sql_io.py
126 126
    
127 127
    return sql_gen.FunctionCall(function, col)
128 128

  
129
def func_wrapper_exception_handler(return_, args, errors_table):
130
    '''Handles a function call's data_exceptions.
131
    Supports PL/Python functions.
132
    @param return_ See data_exception_handler()
133
    @param args [arg...] Function call's args
134
    @param errors_table See data_exception_handler()
135
    '''
136
    args = filter(sql_gen.has_srcs, args)
137
    
138
    srcs = sql_gen.cross_join_srcs(args)
139
    value = sql_gen.ArrayJoin(',', args)
140
    return sql_gen.NestedExcHandler(
141
        data_exception_handler(return_, srcs, errors_table, value)
142
        , sql_gen.plpythonu_error_handler
143
        )
144

  
129 145
def cast_temp_col(db, type_, col, errors_table=None):
130 146
    '''Like cast(), but creates a new column with the cast values if the input
131 147
    is a column.

Also available in: Unified diff