Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Docs Menu
Docs Home
/ / /
PHP 라이브러리 매뉴얼
/ /

MongoDB\ClientBulkWrite::withCollection()

버전 2.1에 추가 되었습니다.

MongoDB\ClientBulkWrite::withCollection()

Return an updated instance of MongoDB\ClientBulkWrite from the provided MongoDB\Collection instance. This method allows you to add subsequent write operations on a different collection than that with which the ClientBulkWrite was created.

This method does not build a new BulkWriteCommand and does not edit the ClientBulkWrite instance in place.

function withCollection(
Collection $collection,
): self

You cannot mix Collection instances associated with different Manager objects when calling this method on a ClientBulkWrite instance. This is because the library sends the completed BulkWriteCommand to a single server.

$collection : MongoDB\Collection
The Collection instance to set as the target for write operations added to the ClientBulkWrite instance after calling withCollection().

A new ClientBulkWrite instance with the same BulkWriteCommand specification but an updated target namespace.

옵션이 사용되지만 선택한 서버에서 지원되지 않는 경우 MongoDB\Exception\UnsupportedException입니다(예: collation, readConcern, writeConcern).

MongoDB\Exception\InvalidArgumentException 매개변수 또는 옵션의 구문 분석과 관련된 오류의 경우입니다.

MongoDB\ 드라이버\Exception\RuntimeException 확장 수준의 다른 오류(예: 연결 오류).

  • 대량 쓰기 작업 가이드 의 클라이언트 대량 쓰기 섹션

돌아가기

updateOne()

이 페이지의 내용