Drop all tables from the database. **CANNOT BE REVERSED!**
(self)
| 161 | return set(self.storage.read() or {}) |
| 162 | |
| 163 | def drop_tables(self) -> None: |
| 164 | """ |
| 165 | Drop all tables from the database. **CANNOT BE REVERSED!** |
| 166 | """ |
| 167 | |
| 168 | # We drop all tables from this database by writing an empty dict |
| 169 | # to the storage thereby returning to the initial state with no tables. |
| 170 | self.storage.write({}) |
| 171 | |
| 172 | # After that we need to remember to empty the ``_tables`` dict, so we'll |
| 173 | # create new table instances when a table is accessed again. |
| 174 | self._tables.clear() |
| 175 | |
| 176 | def drop_table(self, name: str) -> None: |
| 177 | """ |