본문으로 바로가기

mongoClient에서 delete시 DeleteResult 를 리턴받는다.

 

DeleteResult에 대해 간략하게 정리해보았다.

 

* acknowledged(long matchedCount, Long modifiedCount, BsonValue upsertedId) :  확인 된 UpdateResult 만들기 (static UpdateResult)

* getMatchedCount() : 쿼리와 일치하는 문서 수를 가져옵니다. (abstract long)

* getModifiedCount() : 업데이트로 수정 된 문서 수를 가져옵니다.

* getUpsertedId() : 대체 결과 삽입 된 문서를 가져온 경우 삽입 된. 문서의  _id를 가져옵니다. 그렇지 않으면 널입니다.