piskvorky / sqlitedict

Persistent dict, backed by sqlite3 and pickle, multithread-safe.
Apache License 2.0
1.17k stars 131 forks source link

Self-contained solution to drop a table via SqliteDict API #137

Open hholst80 opened 3 years ago

hholst80 commented 3 years ago

I store the main object id as a tablename. If I want to drop the object from the db, there is no way to drop a table using the SqliteDict API itself. I think there should be a drop_table function, similar to the static method get_tablenames.

Reasonable?

anubhav-narayan commented 3 years ago

@hholst80 I have made a Pull Request #141 which has 2 new classes over the existing Sqlitedict class and also has the features you need, I had to clean up the code a little before I could finally get it working, so give it a try if you can. However, I haven't added the drop function to the SqliteDict API itself.