クラス: Mongo::Collection::View::Builder::Aggregation
- 継承:
-
オブジェクト
- オブジェクト
- Mongo::Collection::View::Builder::Aggregation
- 次による拡張機能。
- 転送可能
- 定義:
- lib/mongo/ コレクション/view/Builder/ 集計.rb
Overview
ビューとオプションから集計コマンド仕様を構築します。
定数の概要の削減
- マッピング =
Ruby オプションから集計オプションへのマッピング。
BSON::ドキュメント.新着情報( allow_disk_use: 'allowDiskUse', bypass_document_validation: 'bypassDocumentValidation', explain: ' explain ', collation: 「照合」, comment: 'comment', hint: 'hint', let: ' let ', # これは意図的です。 max_await_time_ms は maxTimeMS のエイリアスです 変更ストリームの getMore コマンド で使用される数。 max_await_time_ms: 'maxTimeMS', max_time_ms: 'maxTimeMS', ).freeze
インスタンス属性の概要を折りたたむ
-
#options ⇒ Hash
readOnly
オプション の map/reduce 特定のオプション。
-
# パイプライン =<Hash> 配列[Hash]
readOnly
パイプライン パイプライン。
-
#view ⇒ Collection::View
readOnly
コレクション ビューを表示します。
インスタンス メソッドの概要を折りたたむ
-
#初期化(パイプライン、ビュー、オプション) = 集計
コンストラクター
ビルダを初期化します。
-
番号指定~ ハッシュ
集計操作に渡す仕様を取得します。
コンストラクターの詳細
#初期化(パイプライン、ビュー、オプション) =集計
ビルダを初期化します。
64 65 66 67 68 |
# ファイル 'lib/mongo/ コレクション/view/Builder/ 集計.rb' は、64 行を デフォルト 初期化(パイプライン, 表示, ) @ pipeline = パイプライン @view = 表示 @options = end |
インスタンス属性の詳細
オプション=ハッシュ(読み取り専用)
特定のオプションのmap/reduce オプションを返します。
55 56 57 |
# ファイル 'lib/mongo/ コレクション/view/Builder/ 集計.rb' は、55 行を デフォルト @options end |
#パイプライン= Array<Hash> (読み取り専用)
パイプライン パイプラインを返します。
49 50 51 |
# ファイル 'lib/mongo/ コレクション/view/Builder/ 集計.rb' は、49 行を デフォルト パイプライン @ pipeline end |
# view = Collection::View (readonly)
コレクション ビューのビューを返します。
52 53 54 |
# ファイル 'lib/mongo/ コレクション/view/Builder/ 集計.rb' は、52 行を デフォルト 表示 @view end |
インスタンス メソッドの詳細
番号指定~ハッシュ
集計操作に渡す仕様を取得します。
78 79 80 81 82 83 84 85 86 87 88 89 90 |
# ファイル 'lib/mongo/ コレクション/view/Builder/ 集計.rb' は、78 行を デフォルト 仕様 スペック = { セレクター: aggregate_command, db_name: database.name, read: @options[:read_preference] || 表示.read_preference, セッション: @options[:session], collation: @options[:collation], } 場合 書込み (write)? スペック.update(write_concern: write_concern) end スペック end |