-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add upsert_multi #119
Add upsert_multi #119
Conversation
This is great, I'm 100% for this postgresql approach in other cases. |
bdaa922
to
cda717e
Compare
@JakNowy @igorbenav PTAL |
87a1eb7
to
d13ddb4
Compare
d13ddb4
to
83d5e75
Compare
Code looks good. Please add a db agnostic implementation as well and change the error for a warning, something like f"Upsert multi is not implemented for {db.bind.dialect.name}. Defaulting to slow db agnostic implementation." |
Sure, can do that. |
5491398
to
3c841f3
Compare
Hmm, I thought about it but instead added more support for sqlite and mysql/mariadb. I think adding slow upsert using the current upsert method is not an option. It doesn't scale. |
Nice one, thanks! |
Description
This is about enabling users to upsert multiple models/rows.
Changes
upsert_multi
toFastCRUD
using dialect-optimized sqlpsycopg
dependency for executing postgres statements via sqlalchemytestcontainers
to run tests in a ephemeral postgres containercloses: #110
Tests
upsert_multi
testupsert_multi
testupsert_multi
testChecklist