• Start

Methods

Patch

The .NET SDK for SurrealDB enables simple and advanced querying of a remote or embedded database.

Applies JSON Patch changes to all records, or a specific record, in the database.

Method Syntax
await db.Patch<T>(resource, data)
Note

This function patches document / record data with the specified JSON Patch data.

Arguments

Description

thing

The table name or the specific RecordId to patch.

data

The JSON Patch data with which to patch the records.

cancellationToken

The cancellationToken enables graceful cancellation of asynchronous operations.

// Update a record with a specific ID
var result = await db.Patch(("person", "tobie"), patches);

// Update all records in a table
var result = await db.Patch("person", patches);

Was this page helpful?