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.addLog('Opening database ...')
db = SQLite.openDatabase(
database_name,
database_version,
database_displayname,
database_size,
this.openCB,
this.errorCB
)
this.populateDatabase(db)
}
constructor() {
this.db = SQLite.openDatabase('visits.db', '1.0', '', 1);
this.db.transaction((txn) => {
txn.executeSql(CREATE_VISIT_TABLE, []);
txn.executeSql('PRAGMA case_sensitive_like=OFF;');
});
events.sub('history:add', (entry) => {
this.addHistoryEntry(entry);
});
}