Revision 3044
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
1081 | 1081 |
add_col(db, col.table, new_typed_col, log_level=3) |
1082 | 1082 |
new_col.name = new_typed_col.name # propagate any renaming |
1083 | 1083 |
|
1084 |
update(db, col.table, [(new_col, expr)], log_level=3) |
|
1084 |
update(db, col.table, [(new_col, expr)], cacheable=True, log_level=3)
|
|
1085 | 1085 |
if not nullable: add_not_null(db, new_col) |
1086 | 1086 |
add_index(db, new_col) |
1087 | 1087 |
|
... | ... | |
1160 | 1160 |
add_col(db, table, new_typed_col) |
1161 | 1161 |
new_col.name = new_typed_col.name # propagate any renaming |
1162 | 1162 |
|
1163 |
update(db, table, [(new_col, expr)]) |
|
1163 |
update(db, table, [(new_col, expr)], cacheable=True)
|
|
1164 | 1164 |
add_index(db, new_col) |
1165 | 1165 |
|
1166 | 1166 |
return new_col |
Also available in: Unified diff
sql.py: add_index_col(), cast_temp_col(): Cache the update that fills in the new column, since it's idempotent