fetchCommentsInDB :: [CommentId] -> ExprCommentCond -> DB [Entity Comment]
fetchCommentsInDB comment_ids has_permission =
    select $
    from $ \c -> do
    where_ $
        c ^. CommentId `in_` valList comment_ids &&.
        has_permission c
    return c

-- | Delete-cascade a comment from the database.
fetchCommentsInDB :: [CommentId] -> ExprCommentCond -> DB [Entity Comment]
fetchCommentsInDB comment_ids has_permission =
    select $
    from $ \c -> do
    where_ $
        c ^. CommentId `in_` valList comment_ids &&.
        has_permission c
    return c

-- | Delete-cascade a comment from the database.
fetchCommentsInDB comment_ids has_permission =
    select $
    from $ \c -> do
    where_ $
        c ^. CommentId `in_` valList comment_ids &&.
        has_permission c
    return c

-- | Delete-cascade a comment from the database.