Project

General

Profile

« Previous | Next » 

Revision 2399

sql.py: mk_select(): conds: Use new sql_gen.ColValueCond instead of sql_gen.as_ValueCond(). Documented that Code and ValueCond are sql_gen objects.

View differences:

lib/sql.py
430 430
    @param fields Use None to select all fields in the table
431 431
    @param conds WHERE conditions: [(compare_left_side, compare_right_side),...]
432 432
        * container can be any iterable type
433
        * compare_left_side: Code|str (for col name)
434
        * compare_right_side: ValueCond|literal value
433
        * compare_left_side: sql_gen.Code|str (for col name)
434
        * compare_right_side: sql_gen.ValueCond|literal value
435 435
    @param distinct_on The columns to SELECT DISTINCT ON, or distinct_on_all to
436 436
        use all columns
437 437
    @return tuple(query, params)
......
485 485
    
486 486
    missing = True
487 487
    if conds != []:
488
        query += ' WHERE '+(' AND '.join((sql_gen.as_ValueCond(r).to_str(db, l)
488
        query += ' WHERE '+(' AND '.join((sql_gen.ColValueCond(l, r).to_str(db)
489 489
            for l, r in conds)))
490 490
        missing = False
491 491
    if order_by != None:

Also available in: Unified diff