Project

General

Profile

« Previous | Next » 

Revision 2970

sql.py: truncate(): Added kw_args to pass to run_query()

View differences:

lib/sql.py
1079 1079
    db.with_autocommit(lambda: run_query(db, 'VACUUM ANALYZE '+table.to_str(db),
1080 1080
        log_level=3))
1081 1081

  
1082
def truncate(db, table, schema='public'):
1082
def truncate(db, table, schema='public', **kw_args):
1083
    '''For params, see run_query()'''
1083 1084
    table = sql_gen.as_Table(table, schema)
1084
    return run_query(db, 'TRUNCATE '+table.to_str(db)+' CASCADE')
1085
    return run_query(db, 'TRUNCATE '+table.to_str(db)+' CASCADE', **kw_args)
1085 1086

  
1086 1087
def empty_temp(db, tables):
1087 1088
    tables = lists.mk_seq(tables)

Also available in: Unified diff