CollectionModify::patch

(No version information available, might only be in Git)

CollectionModify::patchPatch document

说锟斤拷

public mysql_xdevapi\CollectionModify::patch ( string $document ) : mysql_xdevapi\CollectionModify

Takes a patch object and applies it on one or more documents, and can update multiple document properties.

Warning

锟斤拷锟斤拷锟斤拷锟斤拷未锟斤拷写锟侥碉拷锟斤拷锟斤拷锟叫诧拷锟斤拷锟叫憋拷

锟斤拷锟斤拷

document

A document with the properties to apply to the matching documents.

锟斤拷锟斤拷值

A CollectionModify object.

锟斤拷锟斤拷

Example #1 mysql_xdevapi\CollectionModify::patch() example

<?php

$res 
$coll->modify('"Programmatore" IN job')->patch('{"Hobby" : "Programmare"}')->execute();

?>