Project

General

Profile

« Previous | Next » 

Revision 3534

sql_io.py: put_table(): is_function: Creating error handling wrapper function: Set srcs on row_var so that the column type and nullability info of row_var's columns can be retrieved for use with sql_gen.ensure_not_null()

View differences:

lib/sql_io.py
1 1
# Database import/export
2 2

  
3
import copy
3 4
import operator
4 5

  
5 6
import exc
......
447 448
                wrapper = db.TempFunction(sql_gen.concat(into.name, '_wrap'))
448 449
                
449 450
                select_cols = [in_pkey_col]+args.values()
450
                in_pkey_var = sql_gen.Col(in_pkey, sql_gen.row_var)
451
                row_var = copy.copy(sql_gen.row_var)
452
                row_var.set_srcs([in_table])
453
                in_pkey_var = sql_gen.Col(in_pkey, row_var)
451 454
                
452
                args = dict(((k, sql_gen.with_table(v, sql_gen.row_var))
455
                args = dict(((k, sql_gen.with_table(v, row_var))
453 456
                    for k, v in args.iteritems()))
454 457
                func_call = sql_gen.FunctionCall(out_table, **args)
455 458
                

Also available in: Unified diff