diff --git a/Cargo.toml b/Cargo.toml index 2afcb5f..f8b1bc0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ mdka = "1.2.10" #Not Sure if this is useful... rusqlite = {version=">=0.36",features=['bundled']} html2md = "0.2" regex = "1" -exemplar = ">=0.35.0" +#exemplar = ">=0.35.0" [profile.dev] opt-level = 3 diff --git a/src/db.rs b/src/db.rs index 077007e..1c324ad 100644 --- a/src/db.rs +++ b/src/db.rs @@ -14,6 +14,10 @@ struct Item{ const DB_LOCATION: &str = "rsscar.db"; +/* + "on conflict ignore" HAS to be replaced. + What needs to happen is that when a story is already stored the existing item has to be updated. +*/ const feeds_table_create: &str = "CREATE TABLE IF NOT EXISTS 'feeds' ( 'feedID' INTEGER NOT NULL, @@ -29,6 +33,8 @@ const feeds_table_create: &str = "CREATE TABLE IF NOT EXISTS 'feeds' ( const feeds_index_create: &str = "CREATE INDEX IF NOT EXISTS 'subscribed_feeds_idx' ON 'feeds' ( 'feedID' ASC ) WHERE 'subscribed' = 1;"; + +/* */ const items_table_create: &str = "CREATE TABLE IF NOT EXISTS 'items' ( 'itemID' INTEGER NOT NULL, 'title' TEXT NOT NULL,