Project

General

Profile

« Previous | Next » 

Revision 2525

sql.py: put_table(): Handle MissingCastExceptions by attempting to call a function with the name of the type on the column

View differences:

lib/sql.py
1025 1025
            assert e.name == out_table.name
1026 1026
            out_col = 'value' # assume function param was named "value"
1027 1027
            invalid2null(mapping[out_col], e.value)
1028
        except MissingCastException, e:
1029
            log_exc(e)
1030
            
1031
            out_col = e.col
1032
            mapping[out_col] = sql_gen.FunctionCall(e.type, mapping[out_col])
1028 1033
        except DatabaseErrors, e:
1029 1034
            log_exc(e)
1030 1035
            

Also available in: Unified diff