정의
MongoDB\CollectionCRUD 작업 및 인덱스 관리를 포함하여 collection 및 문서에 대한 일반적인 작업을 위한 메서드를 제공합니다.
You can construct collections directly using the extension's MongoDB\Driver\Manager class or select a collection from the library's
MongoDB\ClientorMongoDB\Databaseclasses. A collection may also be cloned from an existingMongoDB\Collectionobject by using thewithOptions()method.MongoDB\Collectionsupports the readConcern, readPreference, typeMap, and writeConcern options. If you omit an option, the collection inherits the value from the Manager constructor argument or theClientorDatabaseobject used to select the collection.Operations within the
MongoDB\Collectionclass inherit the collection's options.