I’m using cordova-sqlcipher-adapter along with ionic-native/sqlite to carry out local DB operations. I’m using create method to open database every time I need to run executeSql for a DB operation. This makes Ionic 3 display the following message:
database already open: data.db
In another earlier topic on this forum, the user was using openDatabase() method to open the DB and hold a reference to the opened DB and carry out operations on the reference subsequently. However, it looks like openDatabase() method is not present as per ionic-native/sqlite documentation.
My question is, is it necessary to execute .create() every time I need to run .executeSql()? Is there a way to open the database ONCE and carry out operations on it at any time while the app is running?