Opened 6 years ago

Closed 6 years ago

#27062 closed New feature (fixed)

Add support for for_update for MSSQL

Reported by: denisenkom Owned by: nobody
Component: Database layer (models, ORM) Version: 1.10
Severity: Normal Keywords: mssql for_update database orm
Cc: denisenkom@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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

Change History (5)

comment:1 Changed 6 years ago by denisenkom

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

comment:2 Changed 6 years ago by Tim Graham

Patch needs improvement: set
Triage Stage: UnreviewedAccepted

Branch needs a rebase.

comment:3 Changed 6 years ago by Tim Graham

Patch needs improvement: unset

comment:4 Changed 6 years ago by Tim Graham

Triage Stage: AcceptedReady for checkin

comment:5 Changed 6 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In bae64dd0:

Fixed #27062 -- Eased implementing select_for_update() on MSSQL.

Note: See TracTickets for help on using tickets.
Back to Top