#2705: [patch] Add optional FOR UPDATE clause to QuerySets
-------------------------------------+-------------------------------------
               Reporter:  Hawkeye    |        Owner:  brunobraga
                   Type:  New        |       Status:  assigned
  feature                            |    Component:  Database layer
              Milestone:             |  (models, ORM)
                Version:  SVN        |     Severity:  Normal
             Resolution:             |     Keywords:
           Triage Stage:  Accepted   |    Has patch:  1
    Needs documentation:  0          |  Needs tests:  0
Patch needs improvement:  0          |
-------------------------------------+-------------------------------------

Comment (by jacob):

 One nit: `docs/ref/models/querysets.txt` claims:

   Passing ``nowait=True`` to ``select_for_update`` using database backends
 that
   do not support ``nowait``, such as MySQL, will cause a ``DatabaseError``
 to be
   raised. This is in order to prevent code unexpectedly blocking.

 But `docs/ref/databases.txt` claims:

    MySQL does not support the ``NOWAIT`` option to the ``SELECT ... FOR
 UPDATE``
    statement. However, you may call the ``select_for_update()`` method of
 a
    queryset with ``nowait=True``. In that case, the argument will be
 silently
    discarded and the generated query will block until the requested lock
 can be
    acquired.

 These don't agree, and looking at the code it appears the first claim is
 correct. So something needs to be updated there.

 Otherwise looks RFC to me.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2705#comment:80>
Django <http://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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to