(db)
| 42 | + " (%s, %s, %s)", (item_type, enum_attr_id, enum_value_id)) |
| 43 | |
| 44 | def doDbChecks(db): |
| 45 | cur = db.cursor() |
| 46 | cur.execute("SELECT COUNT(*) FROM ITEM_TYPE") |
| 47 | rows = cur.fetchall() |
| 48 | if rows[0][0] != 0: |
| 49 | print "ITEM_TYPE table was not empty, it had", rows[0][0], 'rows' |
| 50 | doExitBecauseDbNotEmpty() |
| 51 | cur = db.cursor() |
| 52 | cur.execute("SELECT COUNT(*) FROM ITEM_ATTR") |
| 53 | rows = cur.fetchall() |
| 54 | if rows[0][0] != 0: |
| 55 | print "ITEM_ATTR table was not empty, it had", rows[0][0], 'rows' |
| 56 | doExitBecauseDbNotEmpty() |
| 57 | cur = db.cursor() |
| 58 | cur.execute("SELECT COUNT(*) FROM ITEM_ATTR_ENUM") |
| 59 | rows = cur.fetchall() |
| 60 | if rows[0][0] !=0: |
| 61 | print "ITEM_ATTR_ENUM table was not empty, it had", rows[0][0], 'rows' |
| 62 | doExitBecauseDbNotEmpty() |
| 63 | cur = db.cursor() |
| 64 | cur.execute("SELECT COUNT(*) FROM DIMENSION") |
| 65 | rows = cur.fetchall() |
| 66 | if rows[0][0] !=0: |
| 67 | print "DIMENSION table was not empty, it had", rows[0][0], 'rows' |
| 68 | doExitBecauseDbNotEmpty() |
| 69 | |
| 70 | |
| 71 | def doExitBecauseDbNotEmpty(): |
no test coverage detected