findAllComments method
Returns a FindCommentsResponse
with all the comments
Upon success a list of comments is provided and error is set to null
In case of error a ResponseError
is set and no comment list is provided
Implementation
@override
Future<FindCommentsResponse> findAllComments() {
return catchSqlError<FindCommentsResponse>(
store.commentDao
.findAll()
.then((value) => FindCommentsResponse(comments: value)),
(sqle) => FindCommentsResponse(
error: toResponseError(sqle, context: contextComment)),
options);
}