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

Method Save

ent/node_create.go:163–168  ·  view source on GitHub ↗

Save creates the Node in the database.

(ctx context.Context)

Source from the content-addressed store, hash-verified

161
162// Save creates the Node in the database.
163func (nc *NodeCreate) Save(ctx context.Context) (*Node, error) {
164 if err := nc.defaults(); err != nil {
165 return nil, err
166 }
167 return withHooks(ctx, nc.sqlSave, nc.mutation, nc.hooks)
168}
169
170// SaveX calls Save and panics if Save returns an error.
171func (nc *NodeCreate) SaveX(ctx context.Context) *Node {

Callers 3

SaveXMethod · 0.95
ExecMethod · 0.95
IDMethod · 0.45

Calls 2

defaultsMethod · 0.95
withHooksFunction · 0.85

Tested by

no test coverage detected