Mercurial > hg > nsaunier > traffic-intelligence
comparison scripts/delete-tables.py @ 614:5e09583275a4
Merged Nicolas/trafficintelligence into default
| author | Mohamed Gomaa <eng.m.gom3a@gmail.com> |
|---|---|
| date | Fri, 05 Dec 2014 12:13:53 -0500 |
| parents | 5bda87ac0a69 |
| children | 180b6b0231c0 |
comparison
equal
deleted
inserted
replaced
| 598:11f96bd08552 | 614:5e09583275a4 |
|---|---|
| 1 #! /usr/bin/env python | |
| 2 | |
| 3 import sys, argparse | |
| 4 | |
| 5 import utils | |
| 6 import storage | |
| 7 | |
| 8 parser = argparse.ArgumentParser(description='The program deletes (drops) the tables in the database before saving new results (for objects, tables object_features and objects are dropped; for interactions, the tables interactions and indicators are dropped') | |
| 9 #parser.add_argument('configFilename', help = 'name of the configuration file') | |
| 10 parser.add_argument('-d', dest = 'databaseFilename', help = 'name of the Sqlite database', required = True) | |
| 11 parser.add_argument('-t', dest = 'dataType', help = 'type of the data to remove', required = True, choices = ['object','interaction', 'bb']) | |
| 12 args = parser.parse_args() | |
| 13 | |
| 14 storage.deleteFromSqlite(args.databaseFilename, args.dataType) |
