sgilbertson / sqlite4java

Automatically exported from code.google.com/p/sqlite4java
0 stars 0 forks source link

Deleting a database #66

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice if there was a way to delete a SQLite database. Currently, I 
need to do this outside of sqlite4java by manually deleting the database file. 
This means one implementation for the JVM and another for Android. It would be 
nice if sqlite4java did this so that I didn't need to have two different 
implementations in my own code.

Original issue reported on code.google.com by JayB...@gmail.com on 28 Aug 2014 at 7:56

GoogleCodeExporter commented 9 years ago
This is a requested enhancement, not a defect.

Original comment by JayB...@gmail.com on 28 Aug 2014 at 7:57

GoogleCodeExporter commented 9 years ago
Hi, 

Thanks for your suggestion. Does SQLite have a function for deleting a database?

I think file management is outside the scope of this library, which is a 
wrapper for SQLite functions + object-oriented design + performance 
improvements. 

Igor

Original comment by ser...@almworks.com on 29 Aug 2014 at 4:40

GoogleCodeExporter commented 9 years ago
SQLite does not have such a function. In Android, Context has a deleteDatabase 
method. On the desktop, you need to use File.delete or a similar method.

Original comment by JayB...@gmail.com on 29 Aug 2014 at 7:38

GoogleCodeExporter commented 9 years ago
Thanks for the clarification! For the reasons I mentioned, we won't be 
implementing such method: file management is external to sqlite4java and SQLite.

Original comment by ser...@almworks.com on 29 Aug 2014 at 7:57