Skip to main content

plan_update

Function plan_update 

Source
pub fn plan_update(
    schema_name: &str,
    registry: &Registry,
    ctx: Option<&Context>,
    condition: &Value,
    data: &Value,
    options: &Value,
    now: i64,
    probe: Probe<'_>,
) -> Result<Value, String>
Expand description

更新一条(对应 JS update,findOneAndUpdate + returnDocument AFTER)。

creator 写权限需探针时返回 {"needsProbe": cmd};Host 执行探针后携 Probe::Found / Probe::NoResult 重入即得 {"command": cmd}。 options 为用户透传选项(如 upsert / arrayFilters)。

签名与 JS 参考实现逐一对应(跨语言 parity 优先于参数个数),保持位置参数。