Skip to content

Instantly share code, notes, and snippets.

@BK1031
Created July 16, 2024 01:20
Show Gist options
  • Save BK1031/a1175241fca80b9247bac39aca739c99 to your computer and use it in GitHub Desktop.
Save BK1031/a1175241fca80b9247bac39aca739c99 to your computer and use it in GitHub Desktop.
singlestore-go-bookstore add reset table function to main service test
func ResetBookTable() {
database.DB.Where("1 = 1").Delete(&model.Book{})
}
func ResetOrderTable() {
database.DB.Where("1 = 1").Delete(&model.Order{})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment