Revision 3098
Added by Aaron Marcuse-Kubitza about 12 years ago
lib/sql_gen.py | ||
---|---|---|
267 | 267 |
else: return Col(col, table) |
268 | 268 |
|
269 | 269 |
def with_table(col, table): |
270 |
col = copy.copy(col) # don't modify input! |
|
271 |
col.table = table |
|
270 |
if not isinstance(col, NamedCol): |
|
271 |
col = copy.copy(col) # don't modify input! |
|
272 |
col.table = table |
|
272 | 273 |
return col |
273 | 274 |
|
274 | 275 |
def with_default_table(col, table, overwrite=False): |
275 | 276 |
col = as_Col(col) |
276 |
if not isinstance(col, NamedCol) and (overwrite or col.table == None): |
|
277 |
col = with_table(col, table) |
|
277 |
if overwrite or col.table == None: col = with_table(col, table) |
|
278 | 278 |
return col |
279 | 279 |
|
280 | 280 |
def set_cols_table(table, cols): |
Also available in: Unified diff
sql_gen.py: Moved NamedCol check from with_default_table() to with_table()