Skip to content

Commit

Permalink
added truncate
Browse files Browse the repository at this point in the history
  • Loading branch information
mvrpl committed May 5, 2024
1 parent c185549 commit 4076413
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chsht.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ func updateDB() {
_, errsql := db.Exec(sql)
check(errsql)

sql = fmt.Sprintf(`DELETE FROM %s;`, coll)

_, errsqlt := db.Exec(sql)
check(errsqlt)

coll := mdb.Collection(coll)

cursor, err := coll.Find(context.TODO(), bson.D{})
Expand Down

0 comments on commit 4076413

Please sign in to comment.