Project

General

Profile

« Previous | Next » 

Revision 2965

sql.py: Added empty_temp()

View differences:

lib/sql.py
1083 1083
    table = sql_gen.as_Table(table, schema)
1084 1084
    return run_query(db, 'TRUNCATE '+table.to_str(db)+' CASCADE')
1085 1085

  
1086
def empty_temp(db, tables):
1087
    tables = lists.mk_seq(tables)
1088
    
1089
    db.log_debug('Emptying unneeded temp tables to free up memory', level=1.5)
1090
    for table in tables: truncate(db, table)
1091

  
1086 1092
def tables(db, schema_like='public', table_like='%', exact=False):
1087 1093
    if exact: compare = '='
1088 1094
    else: compare = 'LIKE'

Also available in: Unified diff