doc/upsert: add example for clearing and de/incrementing fields (#1994)

This commit is contained in:
Ariel Mashraki
2021-09-28 22:31:19 +03:00
committed by GitHub
parent 1b071d7e01
commit de9bf4daf1
2 changed files with 3 additions and 1 deletions

View File

@@ -231,6 +231,8 @@ err := client.User.
// Override some of the fields with a custom update.
Update(func(u *ent.UserUpsert) {
u.SetAddress("localhost")
u.AddCount(1)
u.ClearPhone()
}).
Exec(ctx)
```

View File

@@ -566,7 +566,7 @@ header ul, ol {
@media only screen and (min-width: 1425px) {
.homeContainer {
padding: 0 19% 20px;
padding: 0 19% 50px;
}
.home-nav {