Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
loadAndQueryDB = () => {
this.updateProgress("Plugin integrity check ...");
SQLite.echoTest().then(() => {
this.updateProgress("Integrity check passed ...");
this.updateProgress("Opening database ...");
SQLite.openDatabase(database_name, database_version, database_displayname, database_size).then((DB) => {
db = DB;
this.updateProgress("Database OPEN");
this.populateDatabase(DB);
}).catch((error) => {
console.log(error);
});
}).catch(error => {
this.updateProgress("echoTest failed - plugin not functional");
});
};