()
| 47 | } |
| 48 | |
| 49 | @Override |
| 50 | public void dropDb() throws DbException { |
| 51 | Cursor cursor = execQuery("SELECT name FROM sqlite_master WHERE type='table' AND name<>'sqlite_sequence'"); |
| 52 | if (cursor != null) { |
| 53 | try { |
| 54 | while (cursor.moveToNext()) { |
| 55 | try { |
| 56 | String tableName = cursor.getString(0); |
| 57 | execNonQuery("DROP TABLE " + tableName); |
| 58 | } catch (Throwable e) { |
| 59 | LogUtil.e(e.getMessage(), e); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | synchronized (tableMap) { |
| 64 | for (TableEntity<?> table : tableMap.values()) { |
| 65 | table.setTableCheckedStatus(false); |
| 66 | } |
| 67 | tableMap.clear(); |
| 68 | } |
| 69 | } catch (Throwable e) { |
| 70 | throw new DbException(e); |
| 71 | } finally { |
| 72 | IOUtil.closeQuietly(cursor); |
| 73 | } |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | @Override |
| 78 | public void addColumn(Class<?> entityType, String column) throws DbException { |
nothing calls this directly
no test coverage detected