Revision 2777
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
1027 | 1027 |
log_level=3)) |
1028 | 1028 |
|
1029 | 1029 |
def truncate(db, table, schema='public'): |
1030 |
table = sql_gen.as_Table(table, schema) |
|
1030 | 1031 |
return run_query(db, 'TRUNCATE '+table.to_str(db)+' CASCADE') |
1031 | 1032 |
|
1032 | 1033 |
def tables(db, schema_like='public', table_like='%', exact=False): |
Also available in: Unified diff
sql.py: truncate(): Re-added support for string tables using sql_gen.as_Table(). This fixes empty_db(), which relied on this functionality.