Delete one or more records
On this page
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"})
Delete one or more records
affected, err := engine.ID(1).Delete(&User{})
affected, err := engine.Delete(&User{Name:"xlw"})