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

Method Save

ent/node_update.go:223–228  ·  view source on GitHub ↗

Save executes the query and returns the number of nodes affected by the update operation.

(ctx context.Context)

Source from the content-addressed store, hash-verified

221
222// Save executes the query and returns the number of nodes affected by the update operation.
223func (nu *NodeUpdate) Save(ctx context.Context) (int, error) {
224 if err := nu.defaults(); err != nil {
225 return 0, err
226 }
227 return withHooks(ctx, nu.sqlSave, nu.mutation, nu.hooks)
228}
229
230// SaveX is like Save, but panics if an error occurs.
231func (nu *NodeUpdate) SaveX(ctx context.Context) int {

Callers 2

SaveXMethod · 0.95
ExecMethod · 0.95

Calls 2

defaultsMethod · 0.95
withHooksFunction · 0.85

Tested by

no test coverage detected