Migrate to SQLite (#174)

* Migrating Fredy from LowDb to SqLite 🎉

* adding new sql migration system for future sql migrations

* adding setting to change  sqlite path for db files

* create migration plan for graceful migration lowdb -> sqlite

* Improving Documentation

* adding test for sqliteconnection

* upgrading dependencies

* making nodejs 22 as min version

* improve scraper

* adding overwrite ability for db migra
This commit is contained in:
Christian Kellner
2025-09-18 15:38:23 +02:00
committed by GitHub
parent 18fdbd761a
commit 8d95f052c6
31 changed files with 1636 additions and 412 deletions

View File

@@ -1,8 +1,8 @@
const db = {};
export const setKnownListings = (jobKey, providerId, listings) => {
export const storeListings = (jobKey, providerId, listings) => {
if (!Array.isArray(listings)) throw Error('Not a valid array');
db[providerId] = listings;
};
export const getKnownListings = (jobKey, providerId) => {
export const getKnownListingHashesForJobAndProvider = (jobKey, providerId) => {
return db[providerId] || [];
};