orm
orm copied to clipboard
add support for bulk_update
I have to admit I'm not sure how the API should look like. I'll probably take a look at a few examples in other projects. Maybe you can update the PR to show the current signature of the bulk update.
https://github.com/collerek/ormar/blob/1ffb28d7b06f3f7989a6219c900e2fd441cbea42/ormar/queryset/queryset.py#L1064 I think that ormar do the same thing here. Anyway take your time and ping me if you have any updates.
It is also standard bulk update as Django: https://docs.djangoproject.com/en/4.0/ref/models/querysets/#bulk-update
TBH I think this is really good and useful but as long as the databases
project is not doing the bulk actions it's confusing and misleading to have bulk actions here.
But for the record, the databases doesn't do bulk insert/update and will insert these one by one so there won't be any difference.
We can keep it until then.
So, maybe we need to add it to databases
first.
yes, I have an old PR which is doing it but It's not really the best way but it can give you some ideas. Feel free to take a look at that and start your own.
Yeah sure, I will take a look at it.
Check https://github.com/encode/databases/pull/468#issue-1147100109