findCommentsByShaderId method
Returns a FindCommentsResponse
for a shader with id shaderId
On success comments has the corresponding list of comment and error set to null
In case of error a ResponseError
is set and no comment list is provided
Implementation
@override
Future<FindCommentsResponse> findCommentsByShaderId(String shaderId) {
return catchSqlError<FindCommentsResponse>(
store.commentDao.findByShaderId(shaderId).then((results) =>
FindCommentsResponse(
comments: results.map((r) => r.copyWith()).toList())),
(sqle) => FindCommentsResponse(
error: toResponseError(sqle,
context: contextComment, target: shaderId)),
options);
}