Mercurial > hg > nsaunier > traffic-intelligence
comparison python/storage.py @ 584:5bda87ac0a69
renames removeFromSqlite to deleteFromSqlite
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Thu, 04 Dec 2014 16:57:29 -0500 |
| parents | 36605d843be5 |
| children | aab2242ea88c |
comparison
equal
deleted
inserted
replaced
| 583:6ebfb43e938e | 584:5bda87ac0a69 |
|---|---|
| 356 return [] | 356 return [] |
| 357 | 357 |
| 358 connection.close() | 358 connection.close() |
| 359 return objects | 359 return objects |
| 360 | 360 |
| 361 def removeFromSqlite(filename, dataType): | 361 def deleteFromSqlite(filename, dataType): |
| 362 'Removes some tables in the filename depending on type of data' | 362 'Deletes (drops) some tables in the filename depending on type of data' |
| 363 import os | 363 import os |
| 364 if os.path.isfile(filename): | 364 if os.path.isfile(filename): |
| 365 connection = sqlite3.connect(filename) | 365 connection = sqlite3.connect(filename) |
| 366 if dataType == 'object': | 366 if dataType == 'object': |
| 367 dropTables(connection, ['objects', 'objects_features']) | 367 dropTables(connection, ['objects', 'objects_features']) |
