Revision 3045
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
1078 | 1078 |
|
1079 | 1079 |
# Add column |
1080 | 1080 |
new_typed_col = sql_gen.TypedCol(new_col.name, db.col_info(col).type) |
1081 |
add_col(db, col.table, new_typed_col, log_level=3) |
|
1081 |
add_col(db, col.table, new_typed_col, comment='src: '+repr(col), |
|
1082 |
log_level=3) |
|
1082 | 1083 |
new_col.name = new_typed_col.name # propagate any renaming |
1083 | 1084 |
|
1084 | 1085 |
update(db, col.table, [(new_col, expr)], cacheable=True, log_level=3) |
... | ... | |
1157 | 1158 |
|
1158 | 1159 |
# Add column |
1159 | 1160 |
new_typed_col = sql_gen.TypedCol(new_col.name, type_) |
1160 |
add_col(db, table, new_typed_col) |
|
1161 |
add_col(db, table, new_typed_col, comment='src: '+repr(col))
|
|
1161 | 1162 |
new_col.name = new_typed_col.name # propagate any renaming |
1162 | 1163 |
|
1163 | 1164 |
update(db, table, [(new_col, expr)], cacheable=True) |
Also available in: Unified diff
sql.py: add_index_col(), cast_temp_col(): Cache add_col() by providing new comment param to distinguish new columns of the same (colliding) suffixed name but from different source columns