Revision 2323
Added by Aaron Marcuse-Kubitza over 12 years ago
sql.py | ||
---|---|---|
721 | 721 |
tables to join with it using the main input table's pkey |
722 | 722 |
@param mapping dict(out_table_col=in_table_col, ...) |
723 | 723 |
* out_table_col: sql_gen.Col|str |
724 |
* in_table_col: sql_gen.Col Wrap literal values in a sql_gen.NamedCode
|
|
724 |
* in_table_col: sql_gen.Col Wrap literal values in a sql_gen.NamedCol
|
|
725 | 725 |
@return sql_gen.Col Where the output pkeys are made available |
726 | 726 |
''' |
727 | 727 |
for in_table_col in mapping.itervalues(): |
... | ... | |
802 | 802 |
except KeyError: # no mapping for missing col, so every row invalid |
803 | 803 |
db.log_debug('Missing mapping for '+out_col) |
804 | 804 |
run_query_into_pkeys(*mk_select(db, insert_joins, |
805 |
[in_pkey_col, sql_gen.NamedCode(out_pkey, None)], start=0))
|
|
805 |
[in_pkey_col, sql_gen.NamedCol(out_pkey, None)], start=0))
|
|
806 | 806 |
break |
807 | 807 |
else: |
808 | 808 |
log_ignore(in_col, 'NULL') |
Also available in: Unified diff
sql_gen.py: Renamed NamedCode to NamedCol to better reflect its specific use