-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update func comments in chainable_api and FirstOr_ (#5935)
Add comments to functions in chainable_api. Depending on the method, these comments add some additional context or details that are relevant when reading the function, link to the actual docs at gorm.io/docs, or provide examples of use. These comments should make GORM much more pleasant to use with an IDE that provides hoverable comments, and are minimal examples. Also add in-code documentation to FirstOrInit and FirstOrCreate. Almost all examples are directly pulled from the docs, with short comments explaining the code. Most examples omit the `db.Model(&User{})` for brevity, and would not actually work. Co-authored-by: Nate Armstrong <nate.armstrong@eluv.io>
- Loading branch information
1 parent
4ec73c9
commit f3c6fc2
Showing
2 changed files
with
124 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters