MCPcopy
hub / github.com/ent/ent / createSpec

Method createSpec

entc/integration/migrate/entv2/zoo_create.go:88–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86}
87
88func (_c *ZooCreate) createSpec() (*Zoo, *sqlgraph.CreateSpec) {
89 var (
90 _node = &Zoo{config: _c.config}
91 _spec = sqlgraph.NewCreateSpec(zoo.Table, sqlgraph.NewFieldSpec(zoo.FieldID, field.TypeInt))
92 )
93 if id, ok := _c.mutation.ID(); ok {
94 _node.ID = id
95 _spec.ID.Value = id
96 }
97 return _node, _spec
98}
99
100// ZooCreateBulk is the builder for creating many Zoo entities in bulk.
101type ZooCreateBulk struct {

Callers 2

sqlSaveMethod · 0.95
SaveMethod · 0.45

Calls 3

NewCreateSpecFunction · 0.92
NewFieldSpecFunction · 0.92
IDMethod · 0.45

Tested by

no test coverage detected