Dec-19-2018, 10:39 AM
Hello!
I want to lock thousands of records(using select_for_update), but I don't really need that records will be extracted from database.
How can I lock records and not to waste time for extracting, creating objects and etc?
My current code for locking:
I want to lock thousands of records(using select_for_update), but I don't really need that records will be extracted from database.
How can I lock records and not to waste time for extracting, creating objects and etc?
My current code for locking:
qs = cls.objects.select_for_update().filter(namespace__in[namespace1, namespace2]) records = list(qs.all())