entc/mutation: expose builder api for getting mutations (#531)

This commit is contained in:
Ariel Mashraki
2020-06-08 15:16:56 +03:00
committed by GitHub
parent 86d345e187
commit 737fb4afda
134 changed files with 1018 additions and 6 deletions

View File

@@ -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()