[Django] #27062: Add support for for_update for MSSQL

7 views
Skip to first unread message

Django

unread,
Aug 14, 2016, 11:07:44 AM8/14/16
to django-...@googlegroups.com
#27062: Add support for for_update for MSSQL
-------------------------------------+-------------------------------------
Reporter: denisenkom | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 1.10
(models, ORM) | Keywords: mssql for_update
Severity: Normal | database orm
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Currently SQL generator adds FOR UPDATE clause at the end of the query but
MSSQL requires it to be after FROM clause. SQL generator should be
updated to allow for MSSQL syntax.

Patch: https://github.com/django/django/pull/5667

--
Ticket URL: <https://code.djangoproject.com/ticket/27062>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 14, 2016, 11:12:39 AM8/14/16
to django-...@googlegroups.com
#27062: Add support for for_update for MSSQL
-------------------------------------+-------------------------------------
Reporter: denisenkom | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution:
Keywords: mssql for_update | Triage Stage:
database orm | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by denisenkom):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

Because of this there is no way to add MSSQL support without monkey
patching entire as_sql method, see: https://github.com/denisenkom/django-
sqlserver/blob/master/sqlserver/compiler.py#L24

--
Ticket URL: <https://code.djangoproject.com/ticket/27062#comment:1>

Django

unread,
Aug 15, 2016, 9:14:57 AM8/15/16
to django-...@googlegroups.com
#27062: Add support for for_update for MSSQL
-------------------------------------+-------------------------------------
Reporter: denisenkom | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution:
Keywords: mssql for_update | Triage Stage: Accepted
database orm |

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_better_patch: 0 => 1
* stage: Unreviewed => Accepted


Comment:

Branch needs a rebase.

--
Ticket URL: <https://code.djangoproject.com/ticket/27062#comment:2>

Django

unread,
Aug 28, 2016, 2:23:01 PM8/28/16
to django-...@googlegroups.com
#27062: Add support for for_update for MSSQL
-------------------------------------+-------------------------------------
Reporter: denisenkom | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution:
Keywords: mssql for_update | Triage Stage: Accepted
database orm |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/27062#comment:3>

Django

unread,
Sep 2, 2016, 5:18:08 PM9/2/16
to django-...@googlegroups.com
#27062: Add support for for_update for MSSQL
-------------------------------------+-------------------------------------
Reporter: denisenkom | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution:
Keywords: mssql for_update | Triage Stage: Ready for
database orm | checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/27062#comment:4>

Django

unread,
Sep 9, 2016, 12:30:25 PM9/9/16
to django-...@googlegroups.com
#27062: Add support for for_update for MSSQL
-------------------------------------+-------------------------------------
Reporter: denisenkom | Owner: nobody
Type: New feature | Status: closed

Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: mssql for_update | Triage Stage: Ready for
database orm | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"bae64dd0f13ba247448197ecf83cdc7a80691bb4" bae64dd0]:
{{{
#!CommitTicketReference repository=""
revision="bae64dd0f13ba247448197ecf83cdc7a80691bb4"
Fixed #27062 -- Eased implementing select_for_update() on MSSQL.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27062#comment:5>

Reply all
Reply to author
Forward
0 new messages