Php/docs/function.log-cmd-insert

提供:Dev Guides
< Php
移動先:案内検索

log_cmd_insert

(PECL mongo >= 1.5.0)

log_cmd_insertCallback When Inserting Documents


説明

log_cmd_insert ( array $server , array $document , array $writeOptions , array $protocolOptions )

A callable function, used by the log_cmd_insert context option, when inserting 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
document

The document that has been prepared to be inserted

writeOptions
{| ! キー ! 値 |- | ordered | boolean で、バッチ操作をシーケンシャルに行う必要がある (orderd = true) かどうかを表します。 |- | writeConcern | 書き込み確認のオプションの配列 (以下を参照ください) |}
書き込み確認の配列の値
キー
fsync boolean で、強制的にディスクへのフラッシュをしてから返します。
j boolean で、強制的にジャーナルに書き出してから返します。
wtimeout integer で、プライマリがレプリケーションの検証までに待つ最大の時間をミリ秒で指定します。
w integer でサーバー数、あるいは文字列でレプリケーションタグを指定します。
protocolOptions
{| ! キー ! 値 |- | message_length | ネットワーク越しに送信するエンコード済みメッセージのサイズ (バイト数)。 |- | request_id | このメッセージのリクエスト識別子。例:42 |- | namespace | プロトコルメッセージに使う、MongoDB 名前空間。例:dbname.collectionname |}


変更履歴

バージョン 説明
PECL mongo 1.5.0 Only available when connected to MongoDB 2.6.0+