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

What happens when IN clause is too big? #6989

Open
RandsEM opened this issue Apr 24, 2024 · 0 comments
Open

What happens when IN clause is too big? #6989

RandsEM opened this issue Apr 24, 2024 · 0 comments
Assignees
Labels
type:question general questions

Comments

@RandsEM
Copy link

RandsEM commented Apr 24, 2024

Your Question

What happens if in the query, there are too many parameters within the IN clause that exceed the DBMS limit?

For example:
db.Where("name IN ?", []string{"jinzhu", "jinzhu 2", ...}).Find(&users)

In my use case, the number of elements in the IN clause is technically arbitrary since it is determined by user input. Was wondering what would GORM do behind the scenes if this ended up being more than what the underlying DBMS could support?

The document you expected this should be explained

Expected answer

@RandsEM RandsEM added the type:question general questions label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question general questions
Projects
None yet
Development

No branches or pull requests

2 participants