모듈: Mongo::Collection::View::Readable
- 포함 항목:
- Mongo::Collection::View
- 다음에 정의됨:
- lib/ Mongo/ 컬렉션/view/readable.rb
개요
컬렉션 보기에 대한 읽기 관련 동작을 정의합니다.
인스턴스 메서드 요약 접기
-
#애그리게이션(파이프라인, 옵션 = {}) ⇒ 애그리게이션
컬렉션 뷰에서 애그리게이션을 실행합니다.
-
#allow_disk_use ⇒ 보기
서버가 찾기 작업을 실행하는 동안 디스크에 임시 데이터를 쓸 수 있도록 허용합니다.
-
#allow_partial_results ⇒ 보기
일부 샤드가 다운된 경우 쿼리가 부분적인 결과를 얻을 수 있도록 허용합니다.
-
#await_data ⇒ 보기
쿼리 커서에 열린 상태로 유지하고 데이터를 기다리라고 지시합니다.
-
#batch_size(batch_size = nil) ⇒ 정수, 보기
MongoDB 의 각 결과 배치 에서 반환된 문서 수입니다.
-
#comment(comment = nil) ⇒ string, View
댓글을 쿼리와 연결합니다.
-
#count(opts = {}) ⇒ 정수
사용 중단
더 이상 사용되지 않습니다.
대신 #count_documents 또는 #estimated_document_count를 사용하세요. 그러나 #count_documents로 전환할 때는 다음 연산자를 대체해야 합니다.
* $where should be replaced with $expr (only works on 3.6+) * $near should be replaced with $geoWithin with $center * $nearSphere should be replaced with $geoWithin with $centerSphere
-
#count_documents(opts = {}) ⇒ 정수
컬렉션에서 일치하는 문서 수를 가져옵니다.
-
#cursor_type(type = nil) ⇒ :tailable, ...
사용할 커서 유형입니다.
-
#distinct(field_name, opts = {}) ⇒ Array<Object>
특정 필드 에 대한 고유 값 목록을 가져옵니다.
-
#추정 _문서_카운트 (opts = {}) ⇒ 정수
컬렉션 메타데이터를 사용하여 컬렉션에 있는 문서 수의 추정치를 가져옵니다.
-
#hint(hint = nil) ⇒ Hash, View
MongoDB가 쿼리에 강제로 사용할 인덱스입니다.
-
#limit(limit = nil) ⇒ 정수, 보기
쿼리 에서 반환할 Docs 의 최대 개수입니다.
-
#map_reduce(맵, 리듀스, 옵션 = {}) ⇒ MapReduce
컬렉션 뷰에서 맵/리듀스 작업을 실행합니다.
-
#max_await_time_ms(max = nil) ⇒ 정수, 보기
커서에서 더 많은 작업을 처리하는 데 걸리는 누적 시간 제한(밀리초)입니다.
-
#max_scan(value = nil) ⇒ 정수, 보기
사용 중단
더 이상 사용되지 않습니다.
이 옵션은 MongoDB 서버 버전 4.0 부터 더 이상 사용되지 않습니다.
-
#max_time_ms(max = nil) ⇒ 정수, 보기
커서 에서 작업을 처리 하기 위한 누적 시간 제한(밀리초)입니다.
-
#max_value(value = nil) ⇒ 해시, 보기
최대값을 Atlas Search로 설정합니다.
-
#min_value(value = nil) ⇒ 해시, 보기
검색 할 최소값을 설정합니다.
-
#modifiers(doc = nil) ⇒ Hash, View
인수 없이 또는 nil 인수를 사용하여 호출하면 현재 뷰에 대한 레거시 (OP_QUERY) 서버 수정자를 반환합니다.
-
#no_cursor_timeout ⇒ View
서버 는 일반적으로 과도한 메모리 사용을 방지하기 위해 비활성 기간(10 분) 후에 유휴 커서의 시간을 초과합니다.
- #parallel_scan(cursor_count, options = {}) ⇒ 객체
-
#프로젝션(문서 = nil) ⇒ 해시, 보기
결과 설정하다 의 각 문서에 포함하거나 제외할 필드입니다.
-
#읽기(값 = nil) ⇒ 기호, 보기
쿼리에 사용할 읽기 설정입니다.
- #read_concern ⇒ 객체 비공개
- #read_preference ⇒ 객체 비공개
-
#return_key(value = nil) ⇒ true, ...
인덱싱된 필드 만 반환할지 여부를 설정합니다.
-
#show_disk_loc(value = nil) ⇒ true, ... (동의어: #show_record_id)
각 문서에 대해 디스크 위치를 표시할지 여부를 설정합니다.
-
#skip(number = nil) ⇒ 정수, 보기
결과를 반환하기 전에 건너뛸 Docs 의 수입니다.
-
#snapshot(value = nil) ⇒ 객체
사용 중단
더 이상 사용되지 않습니다.
이 옵션은 MongoDB 서버 버전 4.0 부터 더 이상 사용되지 않습니다.
-
#sort(spec = nil) ⇒ 해시, 보기
결과 설정하다 의 정렬 기준이 되는 키 및 방향 쌍입니다.
-
#timeout_ms(timeout_ms = nil) ⇒ Integer, View
작업당 제한 시간(밀리초)입니다.
인스턴스 메서드 세부 정보
#aggregate(파이프라인, options = {}) ⇒ 애그리게이션
컬렉션 뷰에서 애그리게이션을 실행합니다.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 61 def 집계(파이프라인, = {}) = @options.merge() 하지 않는 한 mongo. 집계 = 집계.신규(self, 파이프라인, ) # $merge 및 $out 파이프라인 단계에서 # collection, 수행 시 캐시를 지워야 합니다. # # 하나의 네임스페이스가 아닌 전체 캐시를 지우도록 선택합니다. # $out 및 $merge 단계는 동일한 네임스페이스 에 쓰기 (write) 필요가 없습니다. 애그리게이션이 수행되는 #입니다. 쿼리 캐시.지우기 만약 집계.쓰기 (write)? 집계 end |
#allow_disk_use ⇒ 보기
서버가 찾기 작업을 실행하는 동안 디스크에 임시 데이터를 쓸 수 있도록 허용합니다.
80 81 82 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 80 def allow_disk_use 구성(:allow_disk_use, true) end |
#allow_partial_results ⇒ 보기
일부 샤드가 다운된 경우 쿼리가 부분적인 결과를 얻을 수 있도록 허용합니다.
92 93 94 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 92 def allow_partial_results 구성(:allow_partial_results, true) end |
#await_data ⇒ 보기
쿼리 커서에 열린 상태로 유지하고 데이터를 기다리라고 지시합니다.
104 105 106 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 104 def await_data 구성(:await_data, true) end |
#batch_size(batch_size = nil) ⇒ Integer, View
1 또는 음수를 지정하는 것은 제한을 설정하는 것과 유사합니다.
MongoDB 의 각 결과 배치 에서 반환된 문서 수입니다.
121 122 123 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 121 def batch_size(batch_size = nil) 구성(:batch_size, batch_size) end |
#comment(comment = nil) ⇒ string, View
profileingLevel을 2 로 설정하면 댓글이 쿼리와 함께 프로필 컬렉션에 기록됩니다.
댓글을 쿼리와 연결합니다.
139 140 141 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 139 def comment(comment = nil) 구성(:comment, comment) end |
#count(opts = {}) ⇒ 정수
대신 #count_documents 또는 #estimated_document_count를 사용하세요. 그러나 #count_documents로 전환할 때는 다음 연산자를 대체해야 합니다.
* $where should be replaced with $expr (only works on 3.6+)
* $near should be replaced with $geoWithin with $center
* $nearSphere should be replaced with $geoWithin with $centerSphere
컬렉션에서 일치하는 문서 수를 가져옵니다.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 175 def 카운트(opts = {}) opts = @options.merge(opts) 하지 않는 한 mongo. cmd = { :count => 컬렉션.이름, :query => 필터 } cmd[:skip] = opts[:skip] 만약 opts[:skip] cmd[:hint] = opts[:hint] 만약 opts[:hint] cmd[:limit] = opts[:limit] 만약 opts[:limit] 만약 read_concern cmd[:readConcern] = 옵션::매퍼.transform_values_to_strings( read_concern) end cmd[:maxTimeMS] = opts[:max_time_ms] 만약 opts[:max_time_ms] mongo::Lint.validate_underscore_read_preference(opts[:read]) read_pref = opts[:read] || read_preference 선택기 = ServerSelector.get(read_pref || server_selector) with_session(opts) do |Session| 컨텍스트 = 작업::Context.신규( 클라이언트: 고객, 세션: Session, operation_timeout: operation_timeout(opts) ) read_with_retry(Session, 선택기, 컨텍스트) do |서버| 작업::Count.신규( 선택기: cmd, db_name: database.이름, 옵션: {:limit => -1}, 읽기: read_pref, 세션: Session, # 어떤 이유로든 데이터 정렬은 역사적으로 # string 키. 이는 유효한 사용법으로 문서화되어 있지 않습니다. 데이터 정렬: opts[:collation] || opts['데이터 정렬'] || 데이터 정렬, comment: opts[:comment], ).실행( 서버, 컨텍스트: 컨텍스트 ) end.n.to_i end end |
#count_documents(opts = {}) ⇒ 정수
컬렉션에서 일치하는 문서 수를 가져옵니다.
241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 241 def count_documents(opts = {}) opts = @options.merge(opts) 하지 않는 한 mongo. 파이프라인 = [:'$match' => 필터] 파이프라인 << { :'$skip' => opts[:skip] } 만약 opts[:skip] 파이프라인 << { :'$limit' => opts[:limit] } 만약 opts[:limit] 파이프라인 << { :'$group' => { _id: 1, n: { :'$sum' => 1 } } } opts = opts.슬라이스(:hint, :max_time_ms, :read, :collation, :session, :comment, :timeout_ms) opts[:collation] ||= 데이터 정렬 first = 집계(파이프라인, opts).first 반환 0 하지 않는 한 first first['n'].to_i end |
#cursor_type(type = nil) ⇒ :tailable, ...
사용할 커서 유형입니다. :tailable 또는 :tailable_await일 수 있습니다.
660 661 662 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 660 def cursor_type(유형 = nil) 구성(:cursor_type, 유형) end |
#distinct(field_name, opts = {}) ⇒ Array<Object>
특정 필드 에 대한 고유 값 목록을 가져옵니다.
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 343 def 별개(field_name, opts = {}) 만약 field_name.nil? 올리다 ArgumentError, '고유 작업의 필드 이름은 'nil ' 이 아니어야 합니다. end opts = @options.merge(opts) 하지 않는 한 mongo. cmd = { :distinct => 컬렉션.이름, :key => field_name.to_s, :query => 필터, } cmd[:maxTimeMS] = opts[:max_time_ms] 만약 opts[:max_time_ms] 만약 read_concern cmd[:readConcern] = 옵션::매퍼.transform_values_to_strings( read_concern) end mongo::Lint.validate_underscore_read_preference(opts[:read]) read_pref = opts[:read] || read_preference 선택기 = ServerSelector.get(read_pref || server_selector) with_session(opts) do |Session| 컨텍스트 = 작업::Context.신규( 클라이언트: 고객, 세션: Session, operation_timeout: operation_timeout(opts) ) read_with_retry(Session, 선택기, 컨텍스트) do |서버| 작업::별개.신규( 선택기: cmd, db_name: database.이름, 옵션: {:limit => -1}, 읽기: read_pref, 세션: Session, comment: opts[:comment], # 어떤 이유로든 데이터 정렬은 역사적으로 # string 키. 이는 유효한 사용법으로 문서화되어 있지 않습니다. 데이터 정렬: opts[:collation] || opts['데이터 정렬'] || 데이터 정렬, ).실행( 서버, 컨텍스트: 컨텍스트 ) end.first['values'] end end |
#추정 _문서_카운트 (opts = {}) ⇒ 정수
컬렉션 메타데이터를 사용하여 컬렉션에 있는 문서 수의 추정치를 가져옵니다.
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 276 def 예상_문서_수(opts = {}) 하지 않는 한 보기.필터.비어 있나요? 올리다 ArgumentError, "필터를 사용하여 쿼리할 때 추정된_문서_카운트를 호출할 수 없습니다" end %i[limit 건너뛰기].각 do |opt| 만약 .키?(opt) || opts.키?(opt) 올리다 ArgumentError, "쿼리할 때 #{opt}" end end opts = @options.merge(opts) 하지 않는 한 mongo. mongo::Lint.validate_underscore_read_preference(opts[:read]) read_pref = opts[:read] || read_preference 선택기 = ServerSelector.get(read_pref || server_selector) with_session(opts) do |Session| 컨텍스트 = 작업::Context.신규( 클라이언트: 고객, 세션: Session, operation_timeout: operation_timeout(opts) ) read_with_retry(Session, 선택기, 컨텍스트) do |서버| cmd = { 개수: 컬렉션.이름 } cmd[:maxTimeMS] = opts[:max_time_ms] 만약 opts[:max_time_ms] 만약 read_concern cmd[:readConcern] = 옵션::매퍼.transform_values_to_strings(read_concern) end 결과 = 작업::Count.신규( 선택기: cmd, db_name: database.이름, 읽기: read_pref, 세션: Session, comment: opts[:comment], ).실행(서버, 컨텍스트: 컨텍스트) 결과.n.to_i end end 구출 오류::OperationFailure::패밀리 => exc 만약 exc.코드 == 26 # NamespaceNotFound # 이는 집계 파이프라인 경로에서만 발생해야 합니다. # (서버 4.9+). 이전 서버는 존재하지 않는 경우 0 를 반환해야 합니다. 컬렉션 #개. 0 other 올리다 end end |
#힌트(hint = nil) ⇒ 해시, 보기
MongoDB가 쿼리에 강제로 사용할 인덱스입니다.
394 395 396 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 394 def hint(hint = nil) 구성(:hint, hint) end |
#limit(limit = nil) ⇒ Integer, View
쿼리 에서 반환할 Docs 의 최대 개수입니다.
408 409 410 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 408 def limit(limit = nil) 구성(:limit, limit) end |
#map_reduce(맵, 리듀스, 옵션 = {}) ⇒ MapReduce
컬렉션 뷰에서 맵/리듀스 작업을 실행합니다.
424 425 426 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 424 def map_reduce(map, reduce, = {}) mapReduce.신규(self, map, reduce, @options.merge()) end |
#max_await_time_ms(max = nil) ⇒ Integer, View
커서에서 더 많은 작업을 처리하는 데 걸리는 누적 시간 제한(밀리초)입니다.
632 633 634 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 632 def max_await_time_ms(최대 = nil) 구성(:max_await_time_ms, 최대) end |
#max_scan(value = nil) ⇒ Integer, View
이 옵션은 MongoDB 서버 버전 4.0 부터 더 이상 사용되지 않습니다.
스캔할 최대 문서 수를 설정합니다.
441 442 443 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 441 def max_scan(value = nil) 구성(:max_scan, value) end |
#max_time_ms(max = nil) ⇒ Integer, View
커서 에서 작업을 처리 하기 위한 누적 시간 제한(밀리초)입니다.
646 647 648 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 646 def max_time_ms(최대 = nil) 구성(:max_time_ms, 최대) end |
#max_value(value = nil) ⇒ 해시, 보기
최대값을 Atlas Search로 설정합니다.
455 456 457 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 455 def max_value(value = nil) 구성(:max_value, value) end |
#min_value(value = nil) ⇒ 해시, 보기
검색 할 최소값을 설정합니다.
469 470 471 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 469 def min_value(value = nil) 구성(:min_value, value) end |
#modifiers(doc = nil) ⇒ Hash, View
인수 없이 또는 nil 인수를 사용하여 호출하면 현재 뷰에 대한 레거시 (OP_QUERY) 서버 수정자를 반환합니다. nil이 아닌 인수(해시 또는 하위 클래스여야 함)를 사용하여 호출하면 제공된 수정자를 현재 뷰에 병합합니다. 입력 해시에는 string 과 기호 키가 모두 허용됩니다.
613 614 615 616 617 618 619 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 613 def modifiers(doc = nil) 만약 doc.nil? 작업::찾기::빌더::Modifiers.map_server_modifiers() other 신규(.merge(작업::찾기::빌더::Modifiers.(BSON::문서.신규(doc)))) end end |
#no_cursor_timeout ⇒ 보기
서버 는 일반적으로 과도한 메모리 사용을 방지하기 위해 비활성 기간(10 분) 후에 유휴 커서의 시간을 초과합니다. 이를 방지하려면 이 옵션을 설정합니다.
482 483 484 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 482 def no_cursor_timeout 구성(:no_cursor_timeout, true) end |
#parallel_scan(cursor_count, options = {}) ⇒ 객체
702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 702 def parallel_scan(cursor_count, = {}) 만약 [:session] # 나중에 +options+에 있는 세션으로 세션을 덮어씁니다. Session = 고객.get_session(@options) other Session = nil end 서버 = server_selector.select_server(cluster, nil, Session) 사양 = { coll_name: 컬렉션.이름, db_name: database.이름, cursor_count: cursor_count, read_concern: read_concern, 세션: Session, }.update() Session = 사양[:session] op = 작업::병렬 스캔.신규(사양) # 컨텍스트 객체 는 후속 작업에 재사용해서는 안 됩니다. # GetMore 작업. 컨텍스트 = 작업::Context.신규(클라이언트: 고객, 세션: Session) 결과 = op.실행(서버, 컨텍스트: 컨텍스트) 결과.cursor_ids.map do |cursor_id| 사양 = { cursor_id: cursor_id, coll_name: 컬렉션.이름, db_name: database.이름, 세션: Session, batch_size: batch_size, to_return: 0, # max_time_ms가 여기에 전달되지 않습니다. 의도적으로 가정한 것인가요? } op = 작업::자세히 보기.신규(사양) 컨텍스트 = 작업::Context.신규( 클라이언트: 고객, 세션: Session, connection_global_id: 결과.connection_global_id, ) 결과 = 만약 서버.load_balancer? # 커서 비워지면 연결이 체크인됩니다. 연결 = 서버.풀.check_out(컨텍스트: 컨텍스트) op.execution_with_connection(연결, 컨텍스트: 컨텍스트) other op.실행(서버, 컨텍스트: 컨텍스트) end 커서.신규(self, 결과, 서버, 세션: Session) end end |
#프로젝션(문서 = nil) ⇒ 해시, 보기
값이 0 이면 문서에서 필드 가 제외됩니다. 1 값에 포함됩니다. _id 값을 제외한 값은 모두 0 이거나 모두 1 여야 합니다. _id 필드 는 기본값 포함됩니다. 명시적으로 제외해야 합니다.
결과 설정하다 의 각 문서에 포함하거나 제외할 필드입니다.
500 501 502 503 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 500 def 프로젝션(문서 = nil) validate_doc!(문서) 만약 문서 구성(:projection, 문서) end |
#읽기(값 = nil) ⇒ 기호, 보기
쿼리 에 대해 아무것도 지정하지 않으면 컬렉션 의 읽기 설정 (read preference) 이 사용됩니다.
쿼리에 사용할 읽기 설정입니다.
516 517 518 519 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 516 def 읽기(value = nil) 반환 read_preference 만약 value.nil? 구성(:read, value) end |
#read_concern ⇒ 객체
이 메서드는 비공개 API의 일부입니다. 이 방법은 향후 제거되거나 변경될 수 있으므로 가능하면 사용하지 않는 것이 좋습니다.
674 675 676 677 678 679 680 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 674 def read_concern 만약 [:session] && [:session].in_transaction? [:session].send(:txn_read_concern) || 컬렉션.고객.read_concern other 컬렉션.read_concern end end |
#read_preference ⇒ 객체
이 메서드는 비공개 API의 일부입니다. 이 방법은 향후 제거되거나 변경될 수 있으므로 가능하면 사용하지 않는 것이 좋습니다.
683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 683 def read_preference @read_preference ||= 시작 # 작업 읽기 설정 (read preference) 은 항상 존중되며 다음과 같습니다. # 우선 순위. 트랜잭션 에 있는 경우 다음을 살펴봅니다. # 트랜잭션 읽기 설정 (read preference) 및 기본값 은 클라이언트, 무시 # 컬렉션 읽기 설정 (read preference). 트랜잭션 이 발생하지 않는 경우 # 기본값인 클라이언트 인 컬렉션 읽기 설정 (read preference) 을 살펴봅니다. rp = 만약 [:read] [:read] elsif [:session] && [:session].in_transaction? [:session].txn_read_preference || 컬렉션.고객.read_preference other 컬렉션.read_preference end Lint.validate_underscore_read_preference(rp) rp end end |
#return_key(value = nil) ⇒ true, ...
인덱싱된 필드 만 반환할지 여부를 설정합니다.
531 532 533 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 531 def return_key(value = nil) 구성(:return_key, value) end |
#show_disk_loc(value = nil) ⇒ true, ... show_record_id 라고도 함
각 문서에 대해 디스크 위치를 표시할지 여부를 설정합니다.
546 547 548 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 546 def show_disk_loc(value = nil) 구성(:show_disk_loc, value) end |
#skip(number = nil) ⇒ Integer, View
결과를 반환하기 전에 건너뛸 Docs 의 수입니다.
562 563 564 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 562 def 건너뛰기(숫자 = nil) 구성(:skip, 숫자) end |
#스냅샷(value = nil) ⇒ 객체
이 옵션은 MongoDB 서버 버전 4.0 부터 더 이상 사용되지 않습니다.
true로 설정하다 하면 문서가 두 번 이상 반환되지 않도록 합니다.
뷰의 스냅샷 값을 설정합니다.
580 581 582 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 580 def 스냅샷(value = nil) 구성(: 스냅샷, value) end |
#sort(spec = nil) ⇒ 해시, 보기
결과 설정하다 의 정렬 기준이 되는 키 및 방향 쌍입니다.
595 596 597 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 595 def sort(사양 = nil) 구성(:sort, 사양) end |
#timeout_ms(timeout_ms = nil) ⇒ Integer, View
작업당 제한 시간(밀리초)입니다. 양의 정수여야 합니다.
669 670 671 |
# 파일 'lib/ Mongo/ 컬렉션/view/readable.rb', 줄 669 def timeout_ms(timeout_ms = nil) 구성(:timeout_ms, timeout_ms) end |