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 OrWhereNotIn and WhereNotIn methods #399

Merged
merged 5 commits into from
Jan 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update: update TestWhereNotIn method
  • Loading branch information
Kamandlou committed Jan 28, 2024
commit 999cca5c291f6b0875e170da6bd68d58db46f0a3
6 changes: 3 additions & 3 deletions database/gorm/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2758,9 +2758,9 @@ func (s *QueryTestSuite) TestWhereNotIn() {
s.Nil(query.Create(&user2))
s.True(user2.ID > 0)

var users []User
s.Nil(query.WhereNotIn("id", []any{user.ID, user1.ID}).Find(&users))
s.True(len(users) >= 1)
var user3 User
s.Nil(query.Where("id = ?", user2.ID).WhereNotIn("id", []any{user.ID, user1.ID}).First(&user3))
s.True(user3.ID == user2.ID)
})
}
}
Expand Down
Loading