跳到主要内容

replace_one

增加一个批量操作 - 替换一条数据

声明

void replace_one(map selector, mixed doc, bool upsert = true)

参数

参数名描述
selector替换条件
doc数据
upsert如果没有匹配是否插入(true - 插入, false - 不插入; 默认为true)

返回值

使用方式

返回文档