PHP 8.4.0 RC4 available for testing

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.

Параметри

document

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

Значення, що повертаються

A CollectionModify object.

Приклади

Приклад #1 mysql_xdevapi\CollectionModify::patch() example

<?php

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

?>
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top