MySQL and PHP
Copyright 1997-2021 the PHP Documentation Group.
CollectionModify::patch
Patch document
public mysql_xdevapi\CollectionModify mysql_xdevapi\CollectionModify::patch(string document);
Takes a patch object and applies it on one or more documents, and can update multiple document properties.
This function is currently not documented; only its argument list is available.
document
A document with the properties to apply to the matching documents.
A CollectionModify object.
Example 5.46 mysql_xdevapi\CollectionModify::patch
example
<?php $res = $coll->modify('"Programmatore" IN job')->patch('{"Hobby" : "Programmare"}')->execute(); ?>