Project

General

Profile

« Previous | Next » 

Revision 2203

sql.py: put_table(): mk_select_(): Fixed bug where distinct_on needed to be passed as a keyword param

View differences:

lib/sql.py
787 787
            pkeys_table_exists_ref[0] = True
788 788
    
789 789
    def mk_select_(cols, distinct_on=None):
790
        return mk_select(db, insert_joins, cols, distinct_on, limit=limit,
791
            start=start, table_is_esc=table_is_esc)
790
        return mk_select(db, insert_joins, cols, distinct_on=distinct_on,
791
            limit=limit, start=start, table_is_esc=table_is_esc)
792 792
    
793 793
    out_pkeys_ref = ['out_pkeys_'+temp_suffix]
794 794
    def insert_(distinct_on=None):
795 795
        '''Inserts and capture output pkeys.'''
796 796
        cur = insert_select(db, out_table, mapping.keys(),
797
            *mk_select_(mapping.values(), distinct_on), returning=out_pkey,
797
            *mk_select_(mapping.values()), returning=out_pkey,
798 798
            into_ref=out_pkeys_ref, recover=True, table_is_esc=table_is_esc)
799 799
        if row_ct_ref != None and cur.rowcount >= 0:
800 800
            row_ct_ref[0] += cur.rowcount

Also available in: Unified diff