Skip to content
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

Merged
merged 3 commits into from
Jan 26, 2024
Merged

feat: add WhereIn method #396

merged 3 commits into from
Jan 26, 2024

Conversation

Kamandlou
Copy link
Contributor

@Kamandlou Kamandlou commented Jan 26, 2024

πŸ“‘ Description

Add WhereIn method

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Copy link
Contributor

@hwbrzzl hwbrzzl left a 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

Comment on lines 132 to 133
// WhereIn adds a "where column in" clause to the query.
WhereIn(column string, values []any) Query
Copy link
Contributor

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.


var users []User
s.Nil(query.WhereIn("id", []any{user.ID, user1.ID}).Find(&users))
s.True(len(users) > 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
s.True(len(users) > 0)
s.True(len(users) == 2)

Copy link

codecov bot commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

Comparison is base (7f58672) 69.35% compared to head (5a3c06f) 69.36%.

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.
πŸ“’ Have feedback on the report? Share it here.

@Kamandlou Kamandlou requested a review from hwbrzzl January 26, 2024 14:41
@PEMIDI
Copy link

PEMIDI commented Jan 26, 2024

Good job @Kamandlou

Copy link
Contributor

@hwbrzzl hwbrzzl left a 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.

@hwbrzzl hwbrzzl merged commit af91561 into goravel:master Jan 26, 2024
10 checks passed
@Kamandlou Kamandlou deleted the orm branch January 26, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants