log_cmd_update
(PECL mongo >= 1.5.0)
log_cmd_update — Callback When Updating Documents
説明
log_cmd_update
( array $server
, array $writeOptions
, array $updateOptions
, array $protocolOptions
)
A callable function, used by the log_cmd_update context option, when updateing a document
注意:
This is not a real function, only a prototype of how the function should be.
パラメータ
server
選んだサーバーについての基本情報を含む配列。
キー 値 hash ハーバーハッシュ。例: localhost:27017;-;X;56052
type ノード型 (primary/secondary/mongos/arbiter)。例: 2
max_bson_size このノードがネットワーク越しに受け付ける BSON の最大サイズ。例: 16777216
max_message_size このノードがネットワーク越しに受け入れるメッセージの最大サイズ。例: 48000000
request_id このメッセージのリクエスト識別子。例: 42
writeOptions
- {|
! キー
! 値
|-
| ordered
| boolean で、バッチ操作をシーケンシャルに行う必要がある (orderd = true) かどうかを表します。
|-
| writeConcern
| 書き込み確認のオプションの配列 (以下を参照ください)
|}
書き込み確認の配列の値 キー 値 fsync boolean で、強制的にディスクへのフラッシュをしてから返します。 j boolean で、強制的にジャーナルに書き出してから返します。 wtimeout integer で、プライマリがレプリケーションの検証までに待つ最大の時間をミリ秒で指定します。 w integer でサーバー数、あるいは文字列でレプリケーションタグを指定します。 updateOptions
- {| ! key ! value |- | multi | Boolean, true if this update is allowed to update all matched criteria |- | upsert | Boolean, true if the document should be created if criteria does not match |- | q | Array, the search criteria |- | u | Array, the new object/modifications |}
protocolOptions
- {|
! キー
! 値
|-
| message_length
| ネットワーク越しに送信するエンコード済みメッセージのサイズ (バイト数)。
|-
| request_id
| このメッセージのリクエスト識別子。例:
42
|- | namespace | プロトコルメッセージに使う、MongoDB 名前空間。例:dbname.collectionname
|}
変更履歴
バージョン | 説明 |
---|---|
PECL mongo 1.5.0 | Only available when connected to MongoDB 2.6.0+ |