(db)
| 140 | return types |
| 141 | |
| 142 | def clearUp(db): |
| 143 | with db: |
| 144 | cur = db.cursor() |
| 145 | cur.execute("TRUNCATE TABLE ITEMS") |
| 146 | cur.execute("TRUNCATE TABLE DIMENSION") |
| 147 | cur.execute("TRUNCATE TABLE ITEM_ATTR_ENUM") |
| 148 | cur.execute("TRUNCATE TABLE ITEM_ATTR") |
| 149 | cur.execute("TRUNCATE TABLE ITEM_TYPE") |
| 150 | cur.execute('truncate table users') |
| 151 | cur.execute('truncate table items') |
| 152 | cur.execute('truncate table item_map_varchar') |
| 153 | cur.execute('truncate table item_map_double') |
| 154 | cur.execute('truncate table item_map_datetime') |
| 155 | cur.execute('truncate table item_map_int') |
| 156 | cur.execute('truncate table item_map_boolean') |
| 157 | cur.execute('truncate table item_map_enum') |
| 158 | cur.execute('truncate table item_map_text') |
| 159 | |
| 160 | parser = argparse.ArgumentParser(description="Adds the data schema defined via a file to the DB. Outputs a file (dimensions.json) which contains shortcuts that can be used to narrow the scope of the recommendation output (see API docs for further information).", prog='add_attr_schema.py') |
| 161 | parser.add_argument('-db-host', help='database host', required=False, default="localhost") |
no test coverage detected