Update to use pg/v10
This commit is contained in:
parent
94c75b1d2a
commit
1536d97d8d
13 changed files with 449 additions and 98 deletions
|
@ -18,10 +18,11 @@ func (db *pgDB) AddNews(text string) error {
|
|||
}
|
||||
|
||||
func (db *pgDB) AddRawNews(text string, date time.Time) error {
|
||||
return db.sql.Insert(&New{
|
||||
_, err := db.sql.Model(&New{
|
||||
Text: text,
|
||||
Date: date,
|
||||
})
|
||||
}).Insert()
|
||||
return err
|
||||
}
|
||||
|
||||
// GetNews returns all the news for the last 'days' limiting with a maximum of 'num' results
|
||||
|
|
Reference in a new issue