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

Method SetNillableUserID

ent/share_update.go:567–572  ·  view source on GitHub ↗

SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.

(id *int)

Source from the content-addressed store, hash-verified

565
566// SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
567func (suo *ShareUpdateOne) SetNillableUserID(id *int) *ShareUpdateOne {
568 if id != nil {
569 suo = suo.SetUserID(*id)
570 }
571 return suo
572}
573
574// SetUser sets the "user" edge to the User entity.
575func (suo *ShareUpdateOne) SetUser(u *User) *ShareUpdateOne {

Callers

nothing calls this directly

Calls 1

SetUserIDMethod · 0.95

Tested by

no test coverage detected