Revision 2858
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql_gen.py | ||
---|---|---|
370 | 370 |
|
371 | 371 |
class ValueCond(BasicObject): |
372 | 372 |
def __init__(self, value): |
373 |
if not isinstance(value, Code): value = Literal(value) |
|
374 |
value = remove_col_rename(value) |
|
373 |
value = remove_col_rename(as_Value(value)) |
|
375 | 374 |
|
376 | 375 |
self.value = value |
377 | 376 |
|
... | ... | |
393 | 392 |
self.operator = operator |
394 | 393 |
|
395 | 394 |
def to_str(self, db, left_value): |
396 |
if not isinstance(left_value, Code): left_value = Col(left_value) |
|
397 |
left_value = remove_col_rename(left_value) |
|
395 |
left_value = remove_col_rename(as_Col(left_value)) |
|
398 | 396 |
|
399 | 397 |
right_value = self.value |
400 | 398 |
|
Also available in: Unified diff
sql_gen.py: Use as_*() functions where the auto-wrapping was previously done manually