MCPcopy
hub / github.com/ent/ent / UpdateNodes

Function UpdateNodes

dialect/sql/sqlgraph/graph.go:856–860  ·  view source on GitHub ↗

UpdateNodes applies the UpdateSpec on a set of nodes in the graph.

(ctx context.Context, drv dialect.Driver, spec *UpdateSpec)

Source from the content-addressed store, hash-verified

854
855// UpdateNodes applies the UpdateSpec on a set of nodes in the graph.
856func 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.

Callers 15

sqlSaveMethod · 0.92
sqlSaveMethod · 0.92
sqlSaveMethod · 0.92
sqlSaveMethod · 0.92
sqlSaveMethod · 0.92
sqlSaveMethod · 0.92
sqlSaveMethod · 0.92
sqlSaveMethod · 0.92
sqlSaveMethod · 0.92
sqlSaveMethod · 0.92
sqlSaveMethod · 0.92
sqlSaveMethod · 0.92

Calls 3

nodesMethod · 0.95
DialectFunction · 0.92
DialectMethod · 0.65

Tested by 1

TestUpdateNodesFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…