-
Notifications
You must be signed in to change notification settings - Fork 86
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
feat: add WhereIn method #396
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank Bro! Ci failed, could you please install Mockery and regenerate the interface?
go install github.com/vektra/mockery/[email protected]
mockery --all --keeptree --dir=contracts
contracts/database/orm/orm.go
Outdated
// WhereIn adds a "where column in" clause to the query. | ||
WhereIn(column string, values []any) Query |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S: Please move this method after Where
.
database/gorm/query_test.go
Outdated
|
||
var users []User | ||
s.Nil(query.WhereIn("id", []any{user.ID, user1.ID}).Find(&users)) | ||
s.True(len(users) > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s.True(len(users) > 0) | |
s.True(len(users) == 2) |
Codecov ReportAll modified and coverable lines are covered by tests β
Additional details and impacted files@@ Coverage Diff @@
## master #396 +/- ##
=======================================
Coverage 69.35% 69.36%
=======================================
Files 152 152
Lines 10933 10935 +2
=======================================
+ Hits 7583 7585 +2
Misses 2844 2844
Partials 506 506 β View full report in Codecov by Sentry. |
Good job @Kamandlou |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! Thanks for your contribution.
π Description
Add
WhereIn
methodβ Checks