-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: fix code comment err in Model Join case #2884
Conversation
@BugKillerPro Thanks for your contribution. There's no comment mistake, but the parameter name might lead misunderstanding. It might be better using another parameter name like |
// LeftJoin does "LEFT JOIN ... ON ..." statement on the model.
// The parameter `table` can be joined table and its joined condition,
// and also with its alias name.
//
// Eg:
// Model("user").LeftJoin("user_detail", "user_detail.uid=user.uid")
// Model("user", "u").LeftJoin("user_detail", "ud", "ud.uid=u.uid")
// Model("user", "u").LeftJoin("SELECT xxx FROM xxx AS a", "a.uid=u.uid").
func (m *Model) LeftJoin(table ...string) *Model {
return m.doJoin("LEFT", table...)
} Eg:Model("user", "u").LeftJoin("SELECT xxx FROM xxx AS a", "a.uid=u.uid"). if change above Eg to:Model("user", "u").LeftJoin("SELECT xxx FROM xxx","a", "a.uid=u.uid"). |
Awesome! Would you please update the parameter name as well? |
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #2884 +/- ##
==========================================
- Coverage 79.15% 79.14% -0.01%
==========================================
Files 638 638
Lines 52570 52570
==========================================
- Hits 41611 41609 -2
- Misses 8892 8894 +2
Partials 2067 2067
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
689d62f
to
cf29927
Compare
|
0956baa
to
4dd43aa
Compare
fix code comment err in Model Join case