-
Notifications
You must be signed in to change notification settings - Fork 494
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Batch API: Adds support of request options for transactional batch (#…
…1569) * Extending support of item request options for transactional batch * Adding TransactionalBatchRequestOption and test cases
- Loading branch information
Showing
10 changed files
with
218 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
Microsoft.Azure.Cosmos/src/Batch/TransactionalBatchRequestOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
//------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
//------------------------------------------------------------ | ||
|
||
namespace Microsoft.Azure.Cosmos | ||
{ | ||
/// <summary> | ||
/// Cosmos batch request options. | ||
/// </summary> | ||
public class TransactionalBatchRequestOptions : RequestOptions | ||
{ | ||
/// <summary> | ||
/// Gets or sets the consistency level required for the request in the Azure Cosmos DB service. | ||
/// </summary> | ||
/// <value> | ||
/// The consistency level required for the request. | ||
/// </value> | ||
/// <remarks> | ||
/// Azure Cosmos DB offers 5 different consistency levels. Strong, Bounded Staleness, Session, Consistent Prefix and Eventual - in order of strongest to weakest consistency. <see cref="ConnectionPolicy"/> | ||
/// <para> | ||
/// While this is set at a database account level, Azure Cosmos DB allows a developer to override the default consistency level | ||
/// for each individual request. | ||
/// </para> | ||
/// </remarks> | ||
public ConsistencyLevel? ConsistencyLevel | ||
{ | ||
get => this.BaseConsistencyLevel; | ||
set => this.BaseConsistencyLevel = value; | ||
} | ||
|
||
/// <summary> | ||
/// Fill the CosmosRequestMessage headers with the set properties | ||
/// </summary> | ||
/// <param name="request">The <see cref="RequestMessage"/></param> | ||
internal override void PopulateRequestOptions(RequestMessage request) | ||
{ | ||
base.PopulateRequestOptions(request); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.