Revision 2204
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
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()), returning=out_pkey, |
|
797 |
*mk_select_(mapping.values(), distinct_on), 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
sql.py: put_table(): insert_(): Fixed bug where distinct_on was not passed to mk_select_()