Revision 3508
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql_io.py | ||
---|---|---|
97 | 97 |
|
98 | 98 |
function_name = strings.first_word(type_) |
99 | 99 |
srcs = col.srcs |
100 |
save_errors = (errors_table != None and isinstance(col, sql_gen.Col) |
|
101 |
and col.srcs != ()) |
|
102 |
if save_errors: |
|
103 |
srcs = map(sql_gen.to_name_only_col, col.srcs) |
|
104 |
function_name = str(sql_gen.FunctionCall(function_name, *srcs)) |
|
100 |
save_errors = errors_table != None and srcs |
|
101 |
if save_errors: # function will be unique for the given srcs |
|
102 |
function_name = str(sql_gen.FunctionCall(function_name, |
|
103 |
*map(sql_gen.to_name_only_col, srcs))) |
|
105 | 104 |
function = db.TempFunction(function_name) |
106 | 105 |
|
107 | 106 |
# Create function definition |
Also available in: Unified diff
sql_io.py: cast(): Determining if will be saving errors: Don't add extra check if isinstance(col, sql_gen.Col) because the special case for sql_gen.Literal handles supported non-columns