get5loader icon indicating copy to clipboard operation
get5loader copied to clipboard

[API] Add IsInitialized boolean for db models

Open FlowingSPDG opened this issue 5 years ago • 1 comments

FlowingSPDG avatar Feb 24 '20 01:02 FlowingSPDG

and separate GetOrCreate things. e.g. OLD :

user := db.UserData{}
user.ID = 1
user, _, err := user.GetOrCreate()

NEW :

UserID := 1;
user,_,err := NewOrGetUser(UserID)

FlowingSPDG avatar Feb 24 '20 04:02 FlowingSPDG