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

Method SetNillableUserID

ent/share_create.go:153–158  ·  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

151
152// SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
153func (sc *ShareCreate) SetNillableUserID(id *int) *ShareCreate {
154 if id != nil {
155 sc = sc.SetUserID(*id)
156 }
157 return sc
158}
159
160// SetUser sets the "user" edge to the User entity.
161func (sc *ShareCreate) SetUser(u *User) *ShareCreate {

Callers

nothing calls this directly

Calls 1

SetUserIDMethod · 0.95

Tested by

no test coverage detected