   ([conn org-uuid :- lib-schema/UniqueID user-id :- lib-schema/UniqueID allowed-boards :- [AllowedBoard] order start :- LongNumber direction limit]
     (list-all-bookmarked-entries conn org-uuid user-id allowed-boards order start direction limit {:count false}))
   ([conn org-uuid :- lib-schema/UniqueID user-id :- lib-schema/UniqueID allowed-boards :- [AllowedBoard] order start :- LongNumber direction limit {:keys [count] :or {count false}}]
-  {:pre [(db-common/conn? conn)
-         (#{:desc :asc} order)
-         (#{:before :after} direction)]}
-  (storage-db-common/read-paginated-entries conn table-name :org-uuid-status-bookmark-user-id-map-multi
-   [[:published org-uuid user-id]] order start direction limit :bookmarked-at common/interaction-table-name allowed-boards
-   nil nil list-comment-properties user-id {:count count})))
+   {:pre [(db-common/conn? conn)
+          (#{:desc :asc} order)
+          (#{:before :after} direction)]}
+   (log-query-time "list-all-bookmarked-entries, start")
+   (let [result (storage-db-common/read-paginated-entries conn table-name :org-uuid-status-bookmark-user-id-map-multi
+                                                          [[:published org-uuid user-id]] order start direction limit :bookmarked-at common/interaction-table-name allowed-boards
+                                                          nil nil list-comment-properties user-id {:count count})]
+     (log-query-time "list-all-bookmarked-entries, finish")
+     result)))
 
 (schema/defn ^:always-validate add-bookmark! :- (schema/maybe common/Entry)
   "Add a bookmark for the give entry and user"

                           (str uuid "-v" revision-id)))

(defn- update-entry [conn entry original-entry ts]
  (let [merged-entry (merge original-entry (ignore-props entry))
        attachments (:attachments merged-entry)
        authors-entry (assoc merged-entry :author (:author entry))
        updated-entry (assoc authors-entry :attachments (timestamp-attachments attachments ts))]
    (schema/validate common/Entry updated-entry)
    (db-common/update-resource conn table-name primary-key original-entry updated-entry ts)))

(defn- add-author-to-entry
  [original-entry entry user]

  "
  ([conn org-uuid :- lib-schema/UniqueID]
  {:pre [(db-common/conn? conn)]}
  (log-query-time "list-entries-by-org(2), start")
  (let [entry (db-common/read-resources conn table-name :org-uuid org-uuid)]
    (log-query-time "list-entries-by-org(2), finish")
    entry))

  ([conn org-uuid :- lib-schema/UniqueID order start :- LongNumber
    direction allowed-boards :- [AllowedBoard] {:keys [must-see count container-id] :or {must-see false count false container-id nil}}]
  {:pre [(db-common/conn? conn)
          (#{:desc :asc} order)
          (#{:before :after} direction)]}
  (log-query-time "list-entries-by-org(7), start")
  (let [filter-map (if-not must-see
                     [{:fn :contains :value (map :uuid allowed-boards) :field :board-uuid}]
                     [{:fn :contains :value (map :uuid allowed-boards) :field :board-uuid}
                      {:fn :eq :field :must-see :value (boolean (#{true "true"} must-see))}])
        result (db-common/read-all-resources-and-relations conn table-name
                                                           :status-org-uuid [[:published org-uuid]]
                                                           "published-at" order start direction
                                                           filter-map
                                                           :interactions common/interaction-table-name :uuid :resource-uuid
                                                           list-comment-properties {:count count :container-id container-id})]
    (log-query-time "list-entries-by-org(7), finish")
    result)))

(schema/defn ^:always-validate paginated-entries-by-org
  "
