Project

General

Profile

« Previous | Next » 

Revision 2733

sql.py: truncate(): Support sql_gen.Table objects

View differences:

lib/sql.py
1000 1000
        log_level=3))
1001 1001

  
1002 1002
def truncate(db, table, schema='public'):
1003
    return run_query(db, 'TRUNCATE '+qual_name(db, schema, table)+' CASCADE')
1003
    return run_query(db, 'TRUNCATE '+table.to_str(db)+' CASCADE')
1004 1004

  
1005 1005
def tables(db, schema_like='public', table_like='%', exact=False):
1006 1006
    if exact: compare = '='

Also available in: Unified diff