[DRIVERS-2118] Create collection and database management specifications Created: 26/Mar/18  Updated: 25/May/23

Status: Backlog
Project: Drivers
Component/s: New Spec
Fix Version/s: None

Type: Spec Change Priority: Major - P3
Reporter: Kristofer Brandow (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by GODRIVER-303 provide method to drop collection Closed
is depended on by GODRIVER-308 provide method to drop database Closed
Related
related to PHPLIB-1145 Add helper method Collection::create(... Closed
related to SERVER-55145 Make dropping a nonexistent database ... Closed
related to DRIVERS-2298 Merge index management and enumeratio... Closed
is related to SERVER-43894 Make dropping a nonexistent collectio... Closed
Driver Changes: Needed

 Description   

Add an entry to the specifications GitHub repository that documents methods for dropping a collection and dropping a database.

The rationale for creating an entry on the wiki is that there is currently no space for this specification to live, but we want to retain the information.



 Comments   
Comment by Jérôme Tamarelle [ 25/May/23 ]

I'd like to mention here an inconsistency in mongosh in the fact that there is no method collection.create()

// Existing
db.dropCollection('items', options);
db.items.drop(options);
db.createCollection('items', options);
 
// New expected method
db.items.create(options);

It can be added in the drivers (PHPLIB-1145)

The drop collection helpers have been mentioned in the spec. https://github.com/mongodb/specifications/blob/ae35908e5eadc6cda2d8f5c4e33dada25ba8fa98/source/client-side-encryption/client-side-encryption.rst#drop-collection-helper

Comment by Oleg Pudeyev (Inactive) [ 10/Oct/19 ]

FYI - there is a server ticket proposed to not return an error to the client when the collection is not found (SERVER-43894). If this ticket is implemented, potentially there will no longer be a need for drivers to mandate ignoring the 'ns not found' error.

Comment by David Golden [ 05/Aug/19 ]

N.B. This spec should include whether to ignore NamespaceNotFound errors. Per Slack conversation, Ruby and C do not, but many other drivers do.

Comment by Ian Whalen (Inactive) [ 19/Mar/19 ]

Ack, Jeremy. I'll move this back to Open and we can reschedule+leverage the existing work when this hits the top of the priority queue.

Comment by Jeremy Mikola [ 19/Mar/19 ]

Since this has been drafted, I'd propose we use it to quickly scope and produce specs for database and collection management with create/drop methods documented. This would be similar to the index management spec and round out the full spectrum (we already have enumeration specs for databases, collections, and indexes).

Comment by Ian Whalen (Inactive) [ 18/Mar/19 ]

kris.brandow I don't think we use github wikis. ok to just close this? or would you prefer this go through review?

Comment by Kristofer Brandow (Inactive) [ 26/Mar/18 ]

Rough Draft: https://github.com/mongodb/specifications/wiki/Drop-Methods-for-Database-and-Collection-Types

Generated at Thu Feb 08 08:24:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.