Update to use pg/v10

This commit is contained in:
Las Zenow 2020-11-30 19:03:31 +00:00
parent 94c75b1d2a
commit 1536d97d8d
13 changed files with 449 additions and 98 deletions

View file

@ -11,7 +11,7 @@ type Visit struct {
Downloads int `pg:"type:integer,notnull"`
Views int `pg:"type:integer,notnull"`
BookID string `pg:"type:varchar(16),unique"`
Book *Book
Book *Book `pg:"rel:has-one"`
}
func (db *pgDB) IncViews(ID string) error {