Project

General

Profile

« Previous | Next » 

Revision 2379

sql.py: mk_select(): conds: Support containers of any iterable type

View differences:

lib/sql.py
425 425
        together, with tables after the first being sql_gen.Join objects
426 426
    @param fields Use None to select all fields in the table
427 427
    @param conds WHERE conditions: [(compare_left_side, compare_right_side),...]
428
        * container can be any iterable type
428 429
        * compare_left_side: Code|str (for col name)
429 430
        * compare_right_side: ValueCond|literal value
430 431
    @param distinct_on The columns to SELECT DISTINCT ON, or distinct_on_all to
......
439 440
    # Parse other params
440 441
    if conds == None: conds = []
441 442
    elif isinstance(conds, dict): conds = conds.items()
442
    conds = conds[:] # don't modify input!
443
    conds = list(conds) # don't modify input! (list() copies input)
443 444
    assert limit == None or type(limit) == int
444 445
    assert start == None or type(start) == int
445 446
    if order_by is order_by_pkey:

Also available in: Unified diff