-
-
Notifications
You must be signed in to change notification settings - Fork 864
[BUG]: Bulk insert multiple entities without need to use spread operator #269
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
Comments
Interesting! We weren't aware of that. Will work on implementing passing an array directly. Thanks! |
Fixed in |
I think this is a commit that suppose to fix this (sidenote: maybe linking issues in PRs would help tracking it...). This PR, unfortunately doesn't contain any tests and doesn't actually fix the problem. |
@krzkaczor are you passing the items as a regular array? |
yes |
#797 (comment) Still an issue here |
What version of
drizzle-orm
are you using?0.21.1
Describe the Bug
As far as I can tell, the only way to insert multiple entities in a single query with insert is to use
values
with multiple arguments (use spread operator) ie:This can easily lead to
RangeError: Maximum call stack size exceeded
if there are thousands (~20k and more) of entities being sent.Passing entities as an array should mitigate this problem.
The text was updated successfully, but these errors were encountered: