Project

General

Profile

« Previous | Next » 

Revision 2285

sql.py: Replaced sql_gen.col2sql_gen() with sql_gen.as_Col()

View differences:

lib/sql.py
484 484
        params += conds.values()
485 485
        missing = False
486 486
    if order_by != None:
487
        query += ' ORDER BY '+sql_gen.col2sql_gen(order_by, table0,
488
            table_is_esc).to_str(db)
487
        query += ' ORDER BY '+sql_gen.as_Col(order_by, table0).to_str(db)
489 488
    if limit != None: query += ' LIMIT '+str(limit); missing = False
490 489
    if start != None:
491 490
        if start != 0: query += ' OFFSET '+str(start)
......
742 741
    in_tables = in_tables[:] # don't modify input!
743 742
    in_tables0 = in_tables.pop(0) # first table is separate
744 743
    in_pkey = pkey(db, in_tables0, recover=True)
745
    in_pkey_col = sql_gen.col2sql_gen(in_pkey, in_tables0)
744
    in_pkey_col = sql_gen.as_Col(in_pkey, in_tables0)
746 745
    insert_joins = [in_tables0]+[sql_gen.Join(v, {in_pkey: sql_gen.join_using})
747 746
        for v in in_tables]
748 747
    
749 748
    out_pkey = pkey(db, out_table, recover=True)
750
    out_pkey_col = sql_gen.col2sql_gen(out_pkey, out_table)
749
    out_pkey_col = sql_gen.as_Col(out_pkey, out_table)
751 750
    
752 751
    pkeys = [in_pkey, out_pkey]
753 752
    pkeys_cols = [in_pkey_col, out_pkey_col]

Also available in: Unified diff