1
0
Fork 0
empact/db/repo.go

13 lines
255 B
Go
Raw Normal View History

2015-03-04 19:09:08 +00:00
package db
2015-03-06 10:00:04 +00:00
type Repo struct {
Owner string `json:"owner"`
Name string `json:"name"`
}
2015-03-04 19:09:08 +00:00
2015-03-06 10:00:04 +00:00
const saveRepoQuery = `replace into repos (owner, name, updated_at) values (?, ?, now())`
2015-03-04 19:09:08 +00:00
2015-03-04 20:51:17 +00:00
func (r *Repo) Save() {
2015-03-06 10:00:04 +00:00
conn.MustExec(saveRepoQuery, r.Owner, r.Name)
2015-03-04 19:09:08 +00:00
}