Exec executes the deletion query.
(ctx context.Context)
| 69 | |
| 70 | // Exec executes the deletion query. |
| 71 | func (ndo *NodeDeleteOne) Exec(ctx context.Context) error { |
| 72 | n, err := ndo.nd.Exec(ctx) |
| 73 | switch { |
| 74 | case err != nil: |
| 75 | return err |
| 76 | case n == 0: |
| 77 | return &NotFoundError{node.Label} |
| 78 | default: |
| 79 | return nil |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | // ExecX is like Exec, but panics if an error occurs. |
| 84 | func (ndo *NodeDeleteOne) ExecX(ctx context.Context) { |