Mercurial Hosting > traffic-intelligence
diff python/utils.py @ 235:584613399513
added script and functions to remove object tables
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 05 Jul 2012 23:32:14 -0400 |
parents | ab1a11176d7b |
children | ee1caff48b03 |
line wrap: on
line diff
--- a/python/utils.py Thu Jul 05 23:01:36 2012 -0400 +++ b/python/utils.py Thu Jul 05 23:32:14 2012 -0400 @@ -320,11 +320,11 @@ # sqlite ######################### -#def dropTable(db, tableName): - - -#def removeObjectsSqlite(filename): -# 'Removes the objects and object_features tables in the filename' +def dropTables(connection, tableNames): + 'deletes the table with names in tableNames' + cursor = connection.cursor() + for tableName in tableNames: + cursor.execute('DROP TABLE '+tableName) ######################### # running tests