mirror of
https://github.com/ent/ent.git
synced 2026-05-28 09:49:08 +03:00
entc/mutation: expose builder api for getting mutations (#531)
This commit is contained in:
@@ -96,6 +96,11 @@ func (nu *NodeUpdate) SetNext(n *Node) *NodeUpdate {
|
||||
return nu.SetNextID(n.ID)
|
||||
}
|
||||
|
||||
// Mutation returns the NodeMutation object of the builder.
|
||||
func (nu *NodeUpdate) Mutation() *NodeMutation {
|
||||
return nu.mutation
|
||||
}
|
||||
|
||||
// ClearPrev clears the prev edge to Node.
|
||||
func (nu *NodeUpdate) ClearPrev() *NodeUpdate {
|
||||
nu.mutation.ClearPrev()
|
||||
@@ -351,6 +356,11 @@ func (nuo *NodeUpdateOne) SetNext(n *Node) *NodeUpdateOne {
|
||||
return nuo.SetNextID(n.ID)
|
||||
}
|
||||
|
||||
// Mutation returns the NodeMutation object of the builder.
|
||||
func (nuo *NodeUpdateOne) Mutation() *NodeMutation {
|
||||
return nuo.mutation
|
||||
}
|
||||
|
||||
// ClearPrev clears the prev edge to Node.
|
||||
func (nuo *NodeUpdateOne) ClearPrev() *NodeUpdateOne {
|
||||
nuo.mutation.ClearPrev()
|
||||
|
||||
Reference in New Issue
Block a user