Revision 2261
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql_gen.py | ||
---|---|---|
218 | 218 |
|
219 | 219 |
return as_ValueCond(value2sql_gen(value, default_table, table_is_esc, |
220 | 220 |
assume_col)) |
221 |
|
|
222 |
def join2sql_gen(value, table_is_esc=False): |
|
223 |
'''Converts old-style (tuple-based) joins to sql_gen-compatible values. |
|
224 |
@param table_is_esc If False, assumes any table name is not escaped or that |
|
225 |
re-escaping it will produce the same value. |
|
226 |
''' |
|
227 |
if isinstance(value, Join): return value # already in sql_gen form |
|
228 |
|
|
229 |
assert isinstance(value, tuple) |
|
230 |
table, joins = value |
|
231 |
if table_is_esc: table = unescape_table(table) |
|
232 |
return Join(table, joins) |
Also available in: Unified diff
sql_gen.py: Added join2sql_gen()