Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
deleteDatabase = () => {
this.updateProgress("Deleting database");
SQLite.deleteDatabase(database_name).then(() => {
console.log("Database DELETED");
this.updateProgress("Database DELETED")
}).catch((error) => {
this.errorCB(error);
});
};
deleteDatabase = () => {
this.updateProgress("Deleting database");
SQLite.deleteDatabase(database_name, this.deleteCB, this.errorCB);
}
async setup(testName) {
if (testName == "insertions" || testName == "binsertions") {
try {
await SQLite.deleteDatabase('test.db');
} catch (e) {}
}
this.db = await SQLite.openDatabase("test.db", "1.0", "Test Database", 200000);
await this.db.transaction((tx) => {
tx.executeSql('CREATE TABLE IF NOT EXISTS t1 (string VARCHAR(100), int INTEGER, double REAL, date INTEGER);');
});
await super.setup(testName);
}
deleteDatabase = () => {
this.updateProgress("Deleting database");
SQLite.deleteDatabase(database_name, this.deleteCB, this.errorCB);
}
static delete(database) {
return SQLiteStorage.deleteDatabase(database)
.then(res => ({ res }))
.catch(err => ({ err }));
}
deleteDatabase = () => {
this.updateProgress("Deleting database");
SQLite.deleteDatabase(database_name, this.deleteCB, this.errorCB);
}