-
Notifications
You must be signed in to change notification settings - Fork 499
/
Copy pathPatchItemRequestOptions.cs
36 lines (34 loc) · 1.46 KB
/
PatchItemRequestOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------
namespace Microsoft.Azure.Cosmos
{
using System.Collections.Generic;
using System.Linq;
using Microsoft.Azure.Documents;
/// <summary>
/// Cosmos Patch request options
/// </summary>
public sealed class PatchItemRequestOptions : ItemRequestOptions
{
/// <summary>
/// Gets or sets condition to be checked before the patch operations in the Azure Cosmos DB service.
/// </summary>
/// <value>
/// The condition to be checked before execution of operations.
/// </value>
/// <remarks>
/// Condition can only be a from-clause of a sql statement.
/// Creates a conditional SQL argument which is of format "FROM X where CONDITION",
/// the condition has to be within the scope of the document which is supposed to be patched in the particular request.
/// If the condition is satisfied the patch transaction will take place otherwise it will be returned with precondition failed.
/// </remarks>
/// <sample>
/// PatchItemRequestOptions requestOptions = new PatchItemRequestOptions()
/// {
/// FilterPredicate = "from c where c.taskNum = 3"
/// };
/// </sample>
public string FilterPredicate { get; set; }
}
}