entc/gen: add support for UpdateOne with predicates (#3286)

This commit is contained in:
Ariel Mashraki
2023-01-29 13:09:16 +02:00
committed by GitHub
parent ec7af8774c
commit d11122592a
142 changed files with 926 additions and 0 deletions

View File

@@ -137,6 +137,12 @@ func (uuo *UserUpdateOne) Mutation() *UserMutation {
return uuo.mutation
}
// Where appends a list predicates to the UserUpdate builder.
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne {
uuo.mutation.Where(ps...)
return uuo
}
// Select allows selecting one or more fields (columns) of the returned entity.
// The default is selecting all fields defined in the entity schema.
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne {