클래스: Mongo::Protocol::KillCursors::Upconverter
- 상속:
-
객체
- 객체
- Mongo::Protocol::KillCursors::Upconverter
- 다음에 정의됨:
- lib/ Mongo/ 프로토콜/kill_cursors.rb
개요
레거시 삽입 메시지를 적절한 OP_COMMAND 스타일 메시지로 변환합니다.
인스턴스 속성 요약 접기
-
#컬렉션 ⇒ string
읽기 전용
컬렉션 컬렉션 의 이름입니다.
-
#cursor_ids ⇒ Array<Integer>
읽기 전용
Cursor_ids 커서 ID입니다.
인스턴스 메서드 요약 접기
-
#command ⇒ BSON::Document
상향 변환된 명령을 가져옵니다.
-
#initialize(컬렉션, cursor_ids) ⇒ 업컨버터
생성자
업컨버터를 인스턴스화합니다.
생성자 세부 정보
#initialize(컬렉션, cursor_ids) ⇒ 업컨버터
업컨버터를 인스턴스화합니다.
100 101 102 103 |
# 파일 'lib/ Mongo/ 프로토콜/kill_cursors.rb', 줄 100 def 초기화(컬렉션, cursor_ids) @collection = 컬렉션 @cursor_ids = cursor_ids end |
인스턴스 속성 세부 정보
#컬렉션 ⇒ string (읽기 전용)
컬렉션을 반환합니다. 컬렉션의 이름입니다.
86 87 88 |
# 파일 'lib/ Mongo/ 프로토콜/kill_cursors.rb', 줄 86 def 컬렉션 @collection end |
#cursor_ids ⇒ Array<Integer> (읽기 전용)
반환값 cursor_ids 커서 ID입니다.
89 90 91 |
# 파일 'lib/ Mongo/ 프로토콜/kill_cursors.rb', 줄 89 def cursor_ids @cursor_ids end |
인스턴스 메서드 세부 정보
#command ⇒ BSON::Document
상향 변환된 명령을 가져옵니다.
113 114 115 116 117 118 119 120 121 |
# 파일 'lib/ Mongo/ 프로토콜/kill_cursors.rb', 줄 113 def 명령 문서 = BSON::문서.신규 문서.저장('killCursors', 컬렉션) store_ids = cursor_ids.map do |cursor_id| BSON::Int64.신규(cursor_id) end 문서.저장('cursors', store_ids) 문서 end |