BulkWriteResult()
BulkWriteResult()
A wrapper that contains the results of the
Bulk.execute()
method.
호환성
이 메서드는 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.
MongoDB Atlas: 클라우드에서의 MongoDB 배포를 위한 완전 관리형 서비스
MongoDB Enterprise: MongoDB의 구독 기반 자체 관리 버전
MongoDB Community: MongoDB의 소스 사용 가능 무료 자체 관리 버전
속성
BulkWriteResult
has the following properties:
writeErrors Exception
If there is a write error while processing the bulk write,
mongosh
raises an exception that contains a writeErrors
property with the following fields:
writeErrors
An array of documents that contains information regarding any error, unrelated to write concerns, encountered during the update operation.
writeErrors
contains an error document for each write operation that errors.각 오류 문서에는 다음과 같은 필드가 포함되어 있습니다.
writeErrors.index
Integer that identifies the write operation in the bulk operations list, which uses a zero-based index. See also
Bulk.getOperations()
.
writeConcernError Exception
If there is a write concern error while processing the bulk write,
mongosh
raises an exception that contains a writeConcernError
property with the following fields:
writeConcernError
Document describing errors that relate to the write concern.
Changed in version 7.0.6: (also available in 6.0.14 and 5.0.30): When
BulkWriteResult()
is received frommongos
, write concern errors are always reported, even when one or more write errors occur. In previous releases, the occurrence of write errors could cause theBulkWriteResult()
to not report write concern errors.각 오류 문서에는 다음과 같은 필드가 포함되어 있습니다.
writeConcernError.errInfo.writeConcern
해당 작업에 사용되는 쓰기 관련 객체입니다. 쓰기 문제 객체 필드에 대한 자세한 내용은 쓰기 문제 사양을 참조하세요.
쓰기 고려 객체에는 쓰기 문제의 원본을 나타내는 다음 필드도 포함될 수 있습니다.
writeConcernError.errInfo.writeConcern.provenance
쓰기 문제가 발생한 위치를 나타내는 문자열 값입니다(쓰기 문제
provenance
라고도 함). 다음 표에는 이 필드에 사용할 수 있는 값과 그 의미가 나와 있습니다.출처설명clientSupplied
쓰기 우려 사항은 애플리케이션에서 지정되었습니다.
customDefault
쓰기 고려는 사용자 정의된 기본값에서 비롯된 것입니다.
setDefaultRWConcern
을 참조하십시오.getLastErrorDefaults
쓰기 고려는 복제본 세트의
settings.getLastErrorDefaults
필드에서 발생했습니다.implicitDefault
쓰기 고려는 다른 모든 쓰기 고려 사양이 없는 상태에서 서버에서 발생했습니다.