Save executes the query and returns the number of nodes affected by the update operation.
(ctx context.Context)
| 221 | |
| 222 | // Save executes the query and returns the number of nodes affected by the update operation. |
| 223 | func (nu *NodeUpdate) Save(ctx context.Context) (int, error) { |
| 224 | if err := nu.defaults(); err != nil { |
| 225 | return 0, err |
| 226 | } |
| 227 | return withHooks(ctx, nu.sqlSave, nu.mutation, nu.hooks) |
| 228 | } |
| 229 | |
| 230 | // SaveX is like Save, but panics if an error occurs. |
| 231 | func (nu *NodeUpdate) SaveX(ctx context.Context) int { |