-
-
Notifications
You must be signed in to change notification settings - Fork 461
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
postgres: bulk insert API with UNNEST and ARRAYs #1922
Comments
I imagine we can have a bulk insert API that bypasses ActiveModel. Since UNNEST ARRAY is column-oriented. Something like: MyEntity::bulk_insert([
(my_entity::Column::Id, &[1,2,3,4]),
(my_entity::Column::Name, &["a","b","c","d"]),
]) That'd build: INSERT INTO my_entity (id, name) VALUES UNNEST ARRAY($1, $2);
# where $1 is i32[1,2,3,4], $2 is text["a","b","c","d"] It's still in brainstorming phase so suggestions are welcome. |
From end users perspective I would still like to pass over my whole |
Yes, that sounds great. We can may be add a |
See my comment here #710 (comment)
The text was updated successfully, but these errors were encountered: