Opened 13 years ago

Closed 13 years ago

#17340 closed Uncategorized (needsinfo)

[nonrel] Database feature to disabled INSERT/UPDATE distinction

Reported by: Jonas H. Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords: nonrel
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

(This patch is part of the changes made to the inofficial fork "Django-nonrel" which adds basic support for non-relational databases.)

The distinction between INSERT and UPDATE is an SQL-ism and has no equivalent on most non-relational databases. This patch adds an distinguishes_insert_from_update database flag. If set False, the ORM doesn't even try to execute an UPDATE equivalent when .save() is called.

Note that this is different from and does not affect calls to .update(foo=bar).

Attachments (1)

insert-update-distinction.patch (2.5 KB ) - added by Jonas H. 13 years ago.

Download all attachments as: .zip

Change History (2)

by Jonas H., 13 years ago

comment:1 by Carl Meyer, 13 years ago

Resolution: needsinfo
Status: newclosed

Closing this needsinfo, as this ticket doesn't describe a problem, it describes a solution without sufficient rationale to understand why that solution might make sense. Which backends are these for which updating an existing record in the datastore is not distinguished from adding a new record? Is this change a performance optimization for those backends, or does it fix a bug with them, or what?

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