Revision 6225
Added by Aaron Marcuse-Kubitza about 12 years ago
lib/sql_gen.py | ||
---|---|---|
148 | 148 |
if isinstance(value, Code): return value |
149 | 149 |
else: return Literal(value) |
150 | 150 |
|
151 |
def get_value(value): |
|
152 |
'''Unwraps a Literal's value''' |
|
153 |
value = remove_col_rename(value) |
|
154 |
if isinstance(value, Literal): return value.value |
|
155 |
else: |
|
156 |
assert not isinstance(value, Code) |
|
157 |
return value |
|
158 |
|
|
151 | 159 |
def is_literal(value): return isinstance(value, Literal) |
152 | 160 |
|
153 | 161 |
def is_null(value): return is_literal(value) and value.value == None |
Also available in: Unified diff
sql_gen.py: Added get_value()