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

Method SetNillableWeight

ent/node_create.go:135–140  ·  view source on GitHub ↗

SetNillableWeight sets the "weight" field if the given value is not nil.

(i *int)

Source from the content-addressed store, hash-verified

133
134// SetNillableWeight sets the "weight" field if the given value is not nil.
135func (nc *NodeCreate) SetNillableWeight(i *int) *NodeCreate {
136 if i != nil {
137 nc.SetWeight(*i)
138 }
139 return nc
140}
141
142// AddStoragePolicyIDs adds the "storage_policy" edge to the StoragePolicy entity by IDs.
143func (nc *NodeCreate) AddStoragePolicyIDs(ids ...int) *NodeCreate {

Callers

nothing calls this directly

Calls 1

SetWeightMethod · 0.95

Tested by

no test coverage detected