Opened 4 years ago

Closed 4 years ago

#17340 closed Uncategorized (needsinfo)

[nonrel] Database feature to disabled INSERT/UPDATE distinction

Reported by: jonash Owned by: nobody
Component: Database layer (models, ORM) Version: master
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 jonash 4 years ago.

Download all attachments as: .zip

Change History (2)

Changed 4 years ago by jonash

comment:1 Changed 4 years ago by carljm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to needsinfo
  • Status changed from new to closed

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