From 76dd4f22c9798de72645d960e7603e6c73595199 Mon Sep 17 00:00:00 2001 From: Justin Wind Date: Tue, 5 Apr 2022 10:29:09 -0700 Subject: [PATCH] include topic cache fields in db responses --- src/db/postgres/sql/topic-get-by-id.sql | 4 +++- src/db/postgres/sql/topic-get-by-url.sql | 4 +++- src/db/sqlite/sql/topic-get-by-id.sql | 4 +++- src/db/sqlite/sql/topic-get-by-url.sql | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/db/postgres/sql/topic-get-by-id.sql b/src/db/postgres/sql/topic-get-by-id.sql index aa18336..598b675 100644 --- a/src/db/postgres/sql/topic-get-by-id.sql +++ b/src/db/postgres/sql/topic-get-by-id.sql @@ -15,6 +15,8 @@ SELECT content_fetch_attempts_since_success, content_updated, content_hash, - content_type + content_type, + http_etag, + http_last_modified FROM topic WHERE id = $(topicId) diff --git a/src/db/postgres/sql/topic-get-by-url.sql b/src/db/postgres/sql/topic-get-by-url.sql index adc9ffb..13aa67c 100644 --- a/src/db/postgres/sql/topic-get-by-url.sql +++ b/src/db/postgres/sql/topic-get-by-url.sql @@ -15,6 +15,8 @@ SELECT content_fetch_attempts_since_success, content_updated, content_hash, - content_type + content_type, + http_etag, + http_last_modified FROM topic WHERE url = $(topicUrl) diff --git a/src/db/sqlite/sql/topic-get-by-id.sql b/src/db/sqlite/sql/topic-get-by-id.sql index 86ea7ed..4c1affd 100644 --- a/src/db/sqlite/sql/topic-get-by-id.sql +++ b/src/db/sqlite/sql/topic-get-by-id.sql @@ -15,6 +15,8 @@ SELECT content_fetch_attempts_since_success, content_updated, content_hash, - content_type + content_type, + http_etag, + http_last_modified FROM topic WHERE id = :topicId diff --git a/src/db/sqlite/sql/topic-get-by-url.sql b/src/db/sqlite/sql/topic-get-by-url.sql index d0f5548..b6e9c21 100644 --- a/src/db/sqlite/sql/topic-get-by-url.sql +++ b/src/db/sqlite/sql/topic-get-by-url.sql @@ -15,6 +15,8 @@ SELECT content_fetch_attempts_since_success, content_updated, content_hash, - content_type + content_type, + http_etag, + http_last_modified FROM topic WHERE url = :topicUrl -- 2.45.2