#35793: Add support for atomic upserts
-------------------------------------+-------------------------------------
     Reporter:  Storm Heg            |                    Owner:
                                     |  YashRaj1506
         Type:  New feature          |                   Status:  assigned
    Component:  Database layer       |                  Version:
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by YashRaj1506):

 One thing i have realised that the `bulk_create` doesn't supports `F`
 expressions directly, so a part of this feature would also include how to
 incorporate the value for the current `conflicting_row` to the value of
 the dictionaries which we will be passing, cause the `bulk_create` will
 throw the errors at the tests. There can be two ways either get the values
 from the db in the current dictionary of `update_fields`, and when
 operations are done on the python side, the batched_insert will send the
 data to db or After the the bulk insert has been done , a separate code
 shall run to update those field values which raised conflicts...... but i
 dont think using `update` in a `bulk_create` is a nice approach? I need
 your all opinions on this..
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35793#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019320fa9382-fa1fb20e-8833-4fc9-b6b0-bbf00d463174-000000%40eu-central-1.amazonses.com.

Reply via email to