Add Close() and deleteDatabase() methods for expo-sqlite
We are planning a preview-release for expo-sqlite adapter for AWS Amplify Datastore.
Currently, the database can only be opened but there is not close() method publicly available. The underlying code for close() already exists but it is not exposed publicly according to this post : https://github.com/expo/expo/issues/2278
If a database is loaded from Asset in order to overwrite a previous database, then it is required to close the database as otherwise it might cause an I/O error.
Additionally, there is no deleteDatabase() method available. Alternative is to drop All tables but it is not the same as deleting the database.
Adding support for these methods will bring expo-sqlite in parity with react-native-sqlite-storage package as well.
marked this post as