Project

General

Profile

« Previous | Next » 

Revision 2552

sql.py: put_table(): Added is_func param for whether out_table is the name of a SQL function, not a table

View differences:

sql.py
881 881
        return put(db, table, row, pkey, row_ct_ref) # insert new row
882 882

  
883 883
def put_table(db, out_table, in_tables, mapping, row_ct_ref=None, into=None,
884
    default=None):
884
    default=None, is_func=False):
885 885
    '''Recovers from errors.
886 886
    Only works under PostgreSQL (uses INSERT RETURNING).
887 887
    @param in_tables The main input table to select from, followed by a list of
......
893 893
        Defaults to `out_table.name+'-pkeys'`.
894 894
    @param default The *output* column to use as the pkey for missing rows.
895 895
        If this output column does not exist in the mapping, uses None.
896
    @param is_func Whether out_table is the name of a SQL function, not a table
896 897
    @return sql_gen.Col Where the output pkeys are made available
897 898
    '''
898 899
    out_table = sql_gen.as_Table(out_table)

Also available in: Unified diff