Revision 2539
Added by Aaron Marcuse-Kubitza over 12 years ago
sql.py | ||
---|---|---|
800 | 800 |
expr = copy.copy(expr) # don't modify input! |
801 | 801 |
|
802 | 802 |
# Extract col |
803 |
if isinstance(expr, sql_gen.FunctionCall): col = expr.args[0] |
|
803 |
if isinstance(expr, sql_gen.FunctionCall): |
|
804 |
col = expr.args[0] |
|
805 |
expr = sql_gen.CustomCode('('+expr.to_str(db)+')') |
|
804 | 806 |
else: col = expr |
805 | 807 |
assert sql_gen.is_table_col(col) |
806 | 808 |
|
Also available in: Unified diff
sql.py: add_index(): Fixed bug where expressions needed to be enclosed in () to distinguish them from plain columns