Revision 2750
Added by Aaron Marcuse-Kubitza about 12 years ago
sql_gen.py | ||
---|---|---|
199 | 199 |
if isinstance(col, Code): return col |
200 | 200 |
else: return Col(col, table) |
201 | 201 |
|
202 |
def with_default_table(col, table): |
|
202 |
def with_default_table(col, table, overwrite=False):
|
|
203 | 203 |
col = as_Col(col) |
204 |
if not isinstance(col, NamedCol) and col.table == None:
|
|
204 |
if not isinstance(col, NamedCol) and (overwrite or col.table == None):
|
|
205 | 205 |
col = copy.copy(col) # don't modify input! |
206 | 206 |
col.table = table |
207 | 207 |
return col |
Also available in: Unified diff
sql_gen.py: with_default_table(): Added overwrite param to overwrite the table (if it isn't a NamedCol)