7.Delete one or more records

Delete one or more records

  • delete by id
affected, err := engine.Id(1).Delete(&User{})
  • delete by other conditions
affected, err := engine.Delete(&User{Name:"xlw"})