UpdateNodes applies the UpdateSpec on a set of nodes in the graph.
(ctx context.Context, drv dialect.Driver, spec *UpdateSpec)
| 854 | |
| 855 | // UpdateNodes applies the UpdateSpec on a set of nodes in the graph. |
| 856 | func UpdateNodes(ctx context.Context, drv dialect.Driver, spec *UpdateSpec) (int, error) { |
| 857 | gr := graph{tx: drv, builder: sql.Dialect(drv.Dialect())} |
| 858 | cr := &updater{UpdateSpec: spec, graph: gr} |
| 859 | return cr.nodes(ctx, drv) |
| 860 | } |
| 861 | |
| 862 | // NotFoundError returns when trying to update an |
| 863 | // entity, and it was not found in the database. |
searching dependent graphs…