fix typo in crud.md: add lost double quotation

This commit is contained in:
DinoLai 2017-11-17 23:19:33 +08:00
parent 7dbde463ea
commit f6165b2dc2

View File

@ -665,7 +665,7 @@ func (user *User) BeforeSave(scope *gorm.Scope) (err error) {
```go ```go
// Add extra SQL option for updating SQL // Add extra SQL option for updating SQL
db.Model(&user).Set("gorm:update_option", "OPTION (OPTIMIZE FOR UNKNOWN)").Update("name, "hello") db.Model(&user).Set("gorm:update_option", "OPTION (OPTIMIZE FOR UNKNOWN)").Update("name", "hello")
//// UPDATE users SET name='hello', updated_at = '2013-11-17 21:34:10' WHERE id=111 OPTION (OPTIMIZE FOR UNKNOWN); //// UPDATE users SET name='hello', updated_at = '2013-11-17 21:34:10' WHERE id=111 OPTION (OPTIMIZE FOR UNKNOWN);
``` ```