MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / Exec

Method Exec

ent/node_create.go:1160–1173  ·  view source on GitHub ↗

Exec executes the query.

(ctx context.Context)

Source from the content-addressed store, hash-verified

1158
1159// Exec executes the query.
1160func (u *NodeUpsertBulk) Exec(ctx context.Context) error {
1161 if u.create.err != nil {
1162 return u.create.err
1163 }
1164 for i, b := range u.create.builders {
1165 if len(b.conflict) != 0 {
1166 return fmt.Errorf("ent: OnConflict was set for builder %d. Set it on the NodeCreateBulk instead", i)
1167 }
1168 }
1169 if len(u.create.conflict) == 0 {
1170 return errors.New("ent: missing options for NodeCreateBulk.OnConflict")
1171 }
1172 return u.create.Exec(ctx)
1173}
1174
1175// ExecX is like Exec, but panics if an error occurs.
1176func (u *NodeUpsertBulk) ExecX(ctx context.Context) {

Callers

nothing calls this directly

Calls 2

NewMethod · 0.65
ExecMethod · 0.65

Tested by

no test coverage detected