-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Docs
Inspired by this post: https://developer.mongodb.com/community/forums/t/defining-data-schema-using-pymongo/8533
The create_collection documentation to includes a few command-level options: https://pymongo.readthedocs.io/en/stable/api/pymongo/database.html#pymongo.database.Database.create_collection
Options should be passed as keyword arguments to this method. Supported options vary with MongoDB release. Some examples include: “size”: desired initial size for the collection (in bytes). For capped collections this size is the max size of the collection. “capped”: if True, this is a capped collection “max”: maximum number of objects if capped (optional)
We should update the create_collection documentation to include more modern command options like validator, viewOn, pipeline. We should also link to the docs page for the create command: https://docs.mongodb.com/manual/reference/command/create/