Rewrite XORM queries

This commit is contained in:
Thibault Meyer
2016-11-10 16:16:32 +01:00
parent c040f2fbb1
commit a4454f5d0f
22 changed files with 480 additions and 233 deletions

View File

@ -356,7 +356,9 @@ func GetCommentByID(id int64) (*Comment, error) {
func getCommentsByIssueIDSince(e Engine, issueID, since int64) ([]*Comment, error) {
comments := make([]*Comment, 0, 10)
sess := e.Where("issue_id = ?", issueID).Asc("created_unix")
sess := e.
Where("issue_id = ?", issueID).
Asc("created_unix")
if since > 0 {
sess.And("updated_unix >= ?", since)
}