Update
Update new rows in the database.
This type is used in the examples on this page.
type User struct {
ID int `gosql:"primary"`
Email string
IsActive bool
}
After changing a value, you can update it in the database.
var user User
db.Select("*").Get(&user)
user.Email = "somenewemail@example.com"
db.Update(&user)
Last updated
Was this helpful?