Opened 14 years ago
Closed 14 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)
Change History (2)
by , 14 years ago
| Attachment: | insert-update-distinction.patch added |
|---|
comment:1 by , 14 years ago
| Resolution: | → needsinfo |
|---|---|
| Status: | new → 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?