Inserting documents #11
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#11
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::startInsert()is not yet complete.The insert command should accept any
ArrayAcces&Countable&Traversablewhere field names arenon-empty-stringand values must be one of the values allowed byType::serialize()(this must be documented with the Collection::startInsert() method).The insert command requires a
non-empty-listof documents as an empty list always suggests a mistake. A list with more than one document automatically implies a bulk insertion.The list always has to be given upfront. Allowing documents to be added to the command after creating it but before executing it allows the user to create an invalid state (an empty list) which would require runtime checking. This invalid state should be prevented by design.
I see no uses cases for addition of documents after the command has been created. The command should be created on the condition that there is at least one document to insert.