@@ -18,10 +18,12 @@ (schema-out cache:note) (schema-out cache:index-entry) (schema-out listing) delete-article! delete-notes! + delete-index-entries! + save-index-entries! articles articles+notes listing-htmls fenced-listing unfence) @@ -99,10 +101,19 @@ (query-exec (cache-conn) (~> (from cache:note #:as n) (where (= n.page ,(format "~a" page))) delete))) +(define (delete-index-entries! page) + (query-exec (cache-conn) + (~> (from cache:index-entry #:as e) + (where (= e.page ,(format "~a" page))) + delete))) + +(define (save-index-entries! es) + (void (apply insert! (cache-conn) es))) + ;; ;; ~~~ Fetching articles and notes ~~~ ;; ;; (Private use) Conveniece function for the WHERE `series-page` clause