MCPcopy Create free account
hub / github.com/gogs/gogs / getCommentsByIssueIDSince

Function getCommentsByIssueIDSince

internal/database/comment.go:434–445  ·  view source on GitHub ↗
(e Engine, issueID, since int64)

Source from the content-addressed store, hash-verified

432}
433
434func getCommentsByIssueIDSince(e Engine, issueID, since int64) ([]*Comment, error) {
435 comments := make([]*Comment, 0, 10)
436 sess := e.Where("issue_id = ?", issueID).Asc("created_unix")
437 if since > 0 {
438 sess.And("updated_unix >= ?", since)
439 }
440
441 if err := sess.Find(&comments); err != nil {
442 return nil, err
443 }
444 return comments, loadCommentsAttributes(e, comments)
445}
446
447func getCommentsByRepoIDSince(e Engine, repoID, since int64) ([]*Comment, error) {
448 comments := make([]*Comment, 0, 10)

Callers 2

getCommentsByIssueIDFunction · 0.85

Calls 3

loadCommentsAttributesFunction · 0.85
WhereMethod · 0.80
FindMethod · 0.65

Tested by

no test coverage detected