클래스: Mongo::Operation::Update::Result
- 상속:
-
Operation::Result
- 객체
- Operation::Result
- Mongo::Operation::Update::Result
- 다음에 정의됨:
- lib/ Mongo/operation/ 업데이트/result.rb
개요
업데이트 결과의 사용자 지정 동작을 정의합니다.
상수 요약 접기
- 수정됨 =
이 상수는 비공개 API의 일부입니다. 이 상수는 향후 제거되거나 변경될 수 있으므로 가능하면 사용하지 않는 것이 좋습니다.
결과에서 수정된 Docs 필드 의 수입니다.
'nModified'- upserted =
이 상수는 비공개 API의 일부입니다. 이 상수는 향후 제거되거나 변경될 수 있으므로 가능하면 사용하지 않는 것이 좋습니다.
결과에서 업서트된 Docs 필드 입니다.
'업서트됨'
인스턴스 메서드 요약 접기
- #bulk_result ⇒ 객체
-
#match_count ⇒ 정수
일치하는 문서 수를 가져옵니다.
-
#modified_count ⇒ Integer
수정된 문서 수를 가져옵니다.
-
#upserted_count ⇒ Integer
업서트된 문서 수를 반환합니다.
-
#upserted_id ⇒ 객체
업서트가 발생한 경우 삽입된 문서의 식별자입니다.
인스턴스 메서드 세부 정보
#bulk_result ⇒ 객체
101 102 103 |
# 파일 'lib/ Mongo/operation/ 업데이트/result.rb', 줄 101 def bulk_result BulkResult.신규(@replies, connection_description) end |
#match_count ⇒ 정수
일치하는 문서 수를 가져옵니다.
46 47 48 49 50 51 52 53 54 |
# 파일 'lib/ Mongo/operation/ 업데이트/result.rb', 줄 46 def match_count 반환 0 하지 않는 한 인정? 만약 upsert? 0 other n end end |
#Modifyed_count ⇒ Integer
수정된 문서 수를 가져옵니다.
65 66 67 68 69 |
# 파일 'lib/ Mongo/operation/ 업데이트/result.rb', 줄 65 def 수정된 수 반환 0 하지 않는 한 인정? first[수정됨] end |
#upserted_count ⇒ Integer
업서트된 문서 수를 반환합니다.
96 97 98 |
# 파일 'lib/ Mongo/operation/ 업데이트/result.rb', 줄 96 def upserted_count upsert? ? n : 0 end |
#upserted_id ⇒ 객체
업서트가 발생한 경우 삽입된 문서의 식별자입니다.
81 82 83 84 85 |
# 파일 'lib/ Mongo/operation/ 업데이트/result.rb', 줄 81 def upserted_id 반환 nil 하지 않는 한 upsert? upsert?.first['_id'] end |