mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: add support for UpdateOne with predicates (#3286)
This commit is contained in:
@@ -223,6 +223,12 @@ func (cuo *CarUpdateOne) ClearOwner() *CarUpdateOne {
|
||||
return cuo
|
||||
}
|
||||
|
||||
// Where appends a list predicates to the CarUpdate builder.
|
||||
func (cuo *CarUpdateOne) Where(ps ...predicate.Car) *CarUpdateOne {
|
||||
cuo.mutation.Where(ps...)
|
||||
return cuo
|
||||
}
|
||||
|
||||
// Select allows selecting one or more fields (columns) of the returned entity.
|
||||
// The default is selecting all fields defined in the entity schema.
|
||||
func (cuo *CarUpdateOne) Select(field string, fields ...string) *CarUpdateOne {
|
||||
|
||||
@@ -261,6 +261,12 @@ func (guo *GroupUpdateOne) RemoveUsers(u ...*User) *GroupUpdateOne {
|
||||
return guo.RemoveUserIDs(ids...)
|
||||
}
|
||||
|
||||
// Where appends a list predicates to the GroupUpdate builder.
|
||||
func (guo *GroupUpdateOne) Where(ps ...predicate.Group) *GroupUpdateOne {
|
||||
guo.mutation.Where(ps...)
|
||||
return guo
|
||||
}
|
||||
|
||||
// Select allows selecting one or more fields (columns) of the returned entity.
|
||||
// The default is selecting all fields defined in the entity schema.
|
||||
func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne {
|
||||
|
||||
@@ -436,6 +436,12 @@ func (uuo *UserUpdateOne) RemoveGroups(g ...*Group) *UserUpdateOne {
|
||||
return uuo.RemoveGroupIDs(ids...)
|
||||
}
|
||||
|
||||
// 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 {
|
||||
|
||||
Reference in New Issue
Block a user