MCPcopy
hub / github.com/ent/ent / BatchCreate

Function BatchCreate

dialect/sql/sqlgraph/graph.go:757–761  ·  view source on GitHub ↗

BatchCreate applies the BatchCreateSpec on the graph.

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

Source from the content-addressed store, hash-verified

755
756// BatchCreate applies the BatchCreateSpec on the graph.
757func BatchCreate(ctx context.Context, drv dialect.Driver, spec *BatchCreateSpec) error {
758 gr := graph{tx: drv, builder: sql.Dialect(drv.Dialect())}
759 cr := &batchCreator{BatchCreateSpec: spec, graph: gr}
760 return cr.nodes(ctx, drv)
761}
762
763type (
764 // EdgeMut defines edge mutations.

Callers 15

SaveMethod · 0.92
SaveMethod · 0.92
SaveMethod · 0.92
SaveMethod · 0.92
SaveMethod · 0.92
SaveMethod · 0.92
SaveMethod · 0.92
SaveMethod · 0.92
SaveMethod · 0.92
SaveMethod · 0.92
SaveMethod · 0.92
SaveMethod · 0.92

Calls 3

nodesMethod · 0.95
DialectFunction · 0.92
DialectMethod · 0.65

Tested by 1

TestBatchCreateFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…