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

Method AddStoragePolicy

ent/node_create.go:149–155  ·  view source on GitHub ↗

AddStoragePolicy adds the "storage_policy" edges to the StoragePolicy entity.

(s ...*StoragePolicy)

Source from the content-addressed store, hash-verified

147
148// AddStoragePolicy adds the "storage_policy" edges to the StoragePolicy entity.
149func (nc *NodeCreate) AddStoragePolicy(s ...*StoragePolicy) *NodeCreate {
150 ids := make([]int, len(s))
151 for i := range s {
152 ids[i] = s[i].ID
153 }
154 return nc.AddStoragePolicyIDs(ids...)
155}
156
157// Mutation returns the NodeMutation object of the builder.
158func (nc *NodeCreate) Mutation() *NodeMutation {

Callers

nothing calls this directly

Calls 1

AddStoragePolicyIDsMethod · 0.95

Tested by

no test coverage detected