catalog.db

Persistence for catalog items

catalog

(catalog {:keys (issue year)})(catalog {:keys (issue year)} {:keys [connection]})

Get the catalog for given year and issue.

editorial

(editorial {:keys (catalog_type issue year)})(editorial {:keys (catalog_type issue year)} {:keys [connection]})

Get the editorial for given year, issue and catalog_type.

full-catalog

(full-catalog {:keys (catalog_type year)})(full-catalog {:keys (catalog_type year)} {:keys [connection]})

Get the full catalog for given year and catalog_type.

read-catalog

(read-catalog year issue)

Return a coll of items for given year and issue

read-editorial

(read-editorial year issue type)

Return the editorial as a markdown string for given year, issue and catalog type

read-full-catalog

(read-full-catalog year type)

read-recommendation

(read-recommendation year issue type)

recommendation

(recommendation {:keys (catalog_type issue year)})(recommendation {:keys (catalog_type issue year)} {:keys [connection]})

Get the recommendation for given year, issue and catalog_type.

save-catalog!

(save-catalog! year issue items)

save-catalog-internal!

(save-catalog-internal! {:keys (issue year items)})(save-catalog-internal! {:keys (issue year items)} {:keys [connection]})

Insert or update the given items to the catalog for given year and issue.

save-editorial!

(save-editorial! year issue catalog_type content)

save-editorial-internal!

(save-editorial-internal! {:keys (catalog_type issue content year)})(save-editorial-internal! {:keys (catalog_type issue content year)} {:keys [connection]})

Insert or update the given content to editorials for given year, issue and catalog_type.

save-full-catalog!

(save-full-catalog! year catalog_type items)

save-full-catalog-internal!

(save-full-catalog-internal! {:keys (catalog_type year items)})(save-full-catalog-internal! {:keys (catalog_type year items)} {:keys [connection]})

Insert or update the given items to the full_catalog for given year and catalog_type.

save-recommendation!

(save-recommendation! year issue catalog_type content)

save-recommendation-internal!

(save-recommendation-internal! {:keys (catalog_type issue content year)})(save-recommendation-internal! {:keys (catalog_type issue content year)} {:keys [connection]})

Insert or update the given content to recommendations for given year, issue and catalog_type.