GetTask returns task with specified id and developer.
(db *gorp.DbMap, developer int64, id int64)
| 184 | |
| 185 | // GetTask returns task with specified id and developer. |
| 186 | func GetTask(db *gorp.DbMap, developer int64, id int64) (t *Task, err error) { |
| 187 | err = db.SelectOne(&t, |
| 188 | `SELECT * FROM "task" WHERE "id" = ? AND "developer_id" = ? LIMIT 1`, id, developer) |
| 189 | if err != nil { |
| 190 | err = errors.Wrapf(err, "get task failed") |
| 191 | } |
| 192 | return |
| 193 | } |
| 194 | |
| 195 | // UpdateTask save existing task object to database. |
| 196 | func UpdateTask(db *gorp.DbMap, t *Task) (err error) { |
no outgoing calls
no test coverage detected