Revision 2217
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
11 | 11 |
import lists |
12 | 12 |
from Proxy import Proxy |
13 | 13 |
import rand |
14 |
import sql_gen |
|
14 | 15 |
import strings |
15 | 16 |
import util |
16 | 17 |
|
... | ... | |
447 | 448 |
return sql_ |
448 | 449 |
def cond(entry): |
449 | 450 |
'''Parses conditions''' |
450 |
col, value = entry |
|
451 |
cond_ = parse_col(col)+' ' |
|
452 |
if value == None: cond_ += 'IS' |
|
453 |
else: cond_ += '=' |
|
454 |
cond_ += ' %s' |
|
455 |
return cond_ |
|
451 |
left, right = entry |
|
452 |
return sql_gen.as_ValueCond(right).to_str(db, left) |
|
456 | 453 |
|
457 | 454 |
query = 'SELECT' |
458 | 455 |
|
Also available in: Unified diff
sql.py: mk_select(): cond(): Switched to using sql_gen so that custom conds would be supported