Revision 3105
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql_gen.py | ||
---|---|---|
272 | 272 |
else: return Col(col, table) |
273 | 273 |
|
274 | 274 |
def with_table(col, table): |
275 |
if not isinstance(col, NamedCol): |
|
275 |
if isinstance(col, NamedCol): pass # doesn't take a table |
|
276 |
elif isinstance(col, FunctionCall): |
|
277 |
col = copy.deepcopy(col) # don't modify input! |
|
278 |
col.args[0].table = table |
|
279 |
else: |
|
276 | 280 |
col = copy.copy(col) # don't modify input! |
277 | 281 |
col.table = table |
278 | 282 |
return col |
Also available in: Unified diff
sql_gen.py: with_table(): Support columns that are wrapped in a FunctionCall object