Updating documents #12
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Research
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No project
No assignees
1 participant
Notifications
Total time spent: 20 minutes
Due date
c.fahner
20 minutes
No due date set.
Blocks
#3 Data manipulation
slendium/ocd
Reference
slendium/ocd#12
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The design of
Collection::startUpdate()is not yet complete.The update command should require a filter upfront to minimize the chances of accidentally applying it to all documents/records.
The command should also require a
non-empty-listof update statements upfront. An update command without any updates does not make sense.Update statements are implemented in a similar manner as
Predicateexpressions are now, except they are statements to be processed on a document sequentially instead of expressionlike constructs.The "upsert" option is out of scope for the initial version of this command. Most likely this will have to be implemented as its own
startUpsert():Commandmethod as part of a separate interface forCollection's, as not all databases use the same semantics when it comes to upserting. For example, SQL databases tend to require a unique index conflict whereas MongoDB allows any query that does not match. An additional question is whether to allow a multidocument upsert (the update command is multidocument by default).