dbCleanup not working
literallylara opened this issue · comments
Perhaps it's just me, but the comparison in line 39 does not seem to be working, since expired
was declared as a TEXT
field. If I cast it as INTEGER
it works as intended, e.g.:
function dbCleanup(store) {
var now = new Date().getTime();
store.db.run('DELETE FROM ' + store.table + ' WHERE ? > CAST(expired as INTEGER)', [now]);
}
It would probably be more performant to just declare expired
as INTEGER
when the db is created though?