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

@@ -74,6 +74,11 @@ func (nc *NodeCreate) SetNext(n *Node) *NodeCreate {
return nc.SetNextID(n.ID)
}
// Mutation returns the NodeMutation object of the builder.
func (nc *NodeCreate) Mutation() *NodeMutation {
return nc.mutation
}
// Save creates the Node in the database.
func (nc *NodeCreate) Save(ctx context.Context) (*Node, error) {
var (