略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: log_cmd_update

2024-11-13

log_cmd_update

(PECL mongo >= 1.5.0)

log_cmd_updateCallback 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

Note:

This is not a real function, only a prototype of how the function should be.

参数

server

An array containing the basic information about the server that was picked.

key value
hash server hash, example: localhost:27017;-;X;56052
type Node type (primary/secondary/mongos/arbiter): 2
max_bson_size The maximum BSON Size over the wire this node accepts: 16777216
max_message_size The maximum Message Size over the wire this node accepts: 48000000
request_id The request identifier for this message: 42
writeOptions

key value
ordered boolean, if the operation (in case of batch operation) must be executed sequentually (ordered=true)
writeConcern An array of writeConcern options (see below)
writeConcern array values
key value
fsync boolean, force flushing to disk before returning
j boolean, force journal write before returning
wtimeout integer, milliseconds, maximum time the primary is allowed to wait to verify replication
w integer=server count, or string=replication-tag
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

key value
message_length The total size (in bytes) of the encoded message being sent over the wire
request_id The request identifier for this message: 42
namespace The MongoDB namespace used for the protocol message dbname.collectionname

更新日志

版本 说明
1.5.0 Only available when connected to MongoDB 2.6.0+
add a note add a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/function.log-cmd-update.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3