aboutsummaryrefslogtreecommitdiff
path: root/database.go
diff options
context:
space:
mode:
Diffstat (limited to 'database.go')
-rw-r--r--database.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/database.go b/database.go
index 731f160..6a871ba 100644
--- a/database.go
+++ b/database.go
@@ -1547,6 +1547,11 @@ func getNewsItemFromDB(db *sql.DB, timestamp int) (NewsItem, error) {
return news, nil
}
+func deleteNewsItemFromDB(db *sql.DB, timestamp int) {
+ query := `delete from newsItem where time=$1`
+ db.Exec(query, timestamp)
+}
+
func WriteNewsToDB(db *sql.DB, news NewsItem) {
query := `insert into newsItem (title, content, time) values ($1, $2, $3)`