From 21b7554af151202ce1c23e2a5e19dd8fb53df215 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 28 May 2025 14:53:05 -0400 Subject: [PATCH] not sure yet about exemplar --- Cargo.toml | 2 +- src/db.rs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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,