Revision 2733
Added by Aaron Marcuse-Kubitza over 12 years ago
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
sql.py: truncate(): Support sql_gen.Table objects