Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch: Adds preview support for Patch API #2308

Merged
merged 35 commits into from
Mar 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
a555ee0
Conditional patch intoduction in Patch.
deparash Jan 21, 2021
5330084
Nit 1
deparash Jan 22, 2021
4f28318
moving condition out of patch spec
deparash Jan 22, 2021
88aa1a7
minor update.
deparash Jan 22, 2021
dd35b05
Nit updates
deparash Jan 25, 2021
1e00093
minor update.
deparash Jan 27, 2021
dfc1d80
check function comment.
deparash Jan 27, 2021
a5e3527
Initialized cosmos serializer in case of patch Spec.
deparash Jan 28, 2021
ab26fff
pull from master
deparash Jan 28, 2021
2bedd2d
adding pk and custom serializer fix.
deparash Jan 29, 2021
603c81a
Nit Updates.
deparash Jan 29, 2021
b79dc6d
basic Batch Infra
deparash Jan 29, 2021
24e4a4c
NIT updates.
deparash Jan 29, 2021
89ea17d
Ignore failing test case.
deparash Jan 29, 2021
f433ff9
Nit Updates.
deparash Feb 1, 2021
ed9783d
replaced names for patch request options.
deparash Feb 1, 2021
39051b5
minor update.
deparash Feb 1, 2021
0ff2335
minor update.
deparash Feb 1, 2021
906b7e4
minor update. of null handeling in patch spec.
deparash Feb 2, 2021
ea21ca7
Nit Updates.
deparash Feb 2, 2021
d7304c2
pull from master.
deparash Feb 2, 2021
45a447d
minor NIT update.
deparash Feb 2, 2021
8cad83a
commit to preview.
deparash Mar 15, 2021
7869af1
merge from master.
deparash Mar 15, 2021
b1f5e5a
removing extra line.
deparash Mar 15, 2021
7a4468b
Missing flag fix.
deparash Mar 16, 2021
b1f5496
Patch Operation Type Changed.
deparash Mar 16, 2021
8da7c56
adding DeleteAllItemsByPartitionKeyStreamAsync back to INTERNAL in Co…
deparash Mar 16, 2021
505fe0a
Merge branch 'master' into users/deparash/conditional-patch
j82w Mar 16, 2021
5f02140
changes after running UpdateContracts.ps1
deparash Mar 16, 2021
1b4870a
Merge branch 'users/deparash/conditional-patch' of https://github.com…
deparash Mar 16, 2021
4e5eba4
Merge branch 'master' into users/deparash/conditional-patch
j82w Mar 16, 2021
658d10c
PatchOperation{T} moved to preview
deparash Mar 16, 2021
9b4a09b
Update contract rerun.
deparash Mar 16, 2021
ff9d5fa
Merge branch 'users/deparash/conditional-patch' of https://github.com…
deparash Mar 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Microsoft.Azure.Cosmos/src/Batch/TransactionalBatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public abstract TransactionalBatch DeleteItem(
string id,
TransactionalBatchItemRequestOptions requestOptions = null);

#if INTERNAL
#if PREVIEW
/// <summary>
/// Adds an operation to patch an item into the batch.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Microsoft.Azure.Cosmos

internal abstract class TransactionalBatchInternal : TransactionalBatch
{
#if !INTERNAL
#if !PREVIEW
deparash marked this conversation as resolved.
Show resolved Hide resolved
/// <summary>
/// Adds an operation to patch an item into the batch.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Microsoft.Azure.Cosmos
/// <summary>
/// Cosmos Batch Patch request options
/// </summary>
#if INTERNAL
#if PREVIEW
deparash marked this conversation as resolved.
Show resolved Hide resolved
public
#else
internal
Expand Down
2 changes: 1 addition & 1 deletion Microsoft.Azure.Cosmos/src/Patch/PatchOperation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Microsoft.Azure.Cosmos
/// <summary>
/// Details of Patch operation that is to be applied to the referred Cosmos item.
/// </summary>
#if INTERNAL
#if PREVIEW
public
#else
internal
Expand Down
2 changes: 1 addition & 1 deletion Microsoft.Azure.Cosmos/src/Patch/PatchOperationType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Microsoft.Azure.Cosmos
/// Type of Patch operation.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
#if INTERNAL
#if PREVIEW
public
#else
internal
Expand Down
2 changes: 1 addition & 1 deletion Microsoft.Azure.Cosmos/src/Patch/PatchOperation{T}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Microsoft.Azure.Cosmos
/// Defines PatchOperation with a value parameter.
/// </summary>
/// <typeparam name="T">Data type of value provided for PatchOperation.</typeparam>
#if INTERNAL
#if PREVIEW
public
#else
internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Microsoft.Azure.Cosmos
/// <summary>
/// Cosmos Patch request options
/// </summary>
#if INTERNAL
#if PREVIEW
public
#else
internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ public abstract Task<ItemResponse<T>> ReplaceItemAsync<T>(
ItemRequestOptions requestOptions = null,
CancellationToken cancellationToken = default);

#if INTERNAL
#if PREVIEW
/// <summary>
/// Patches an item in the Azure Cosmos service as an asynchronous operation.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ public static void ValidatePartitionKey(object partitionKey, RequestOptions requ
}

#if !INTERNAL
public abstract Task<ResponseMessage> DeleteAllItemsByPartitionKeyStreamAsync(
Cosmos.PartitionKey partitionKey,
RequestOptions requestOptions = null,
CancellationToken cancellationToken = default(CancellationToken));
#endif

#if !PREVIEW
public abstract Task<ResponseMessage> PatchItemStreamAsync(
string id,
PartitionKey partitionKey,
Expand All @@ -139,13 +146,6 @@ public abstract Task<ItemResponse<T>> PatchItemAsync<T>(
PatchItemRequestOptions requestOptions = null,
CancellationToken cancellationToken = default);

public abstract Task<ResponseMessage> DeleteAllItemsByPartitionKeyStreamAsync(
Cosmos.PartitionKey partitionKey,
RequestOptions requestOptions = null,
CancellationToken cancellationToken = default(CancellationToken));
#endif

#if !PREVIEW
public abstract Task<IReadOnlyList<FeedRange>> GetFeedRangesAsync(CancellationToken cancellationToken = default);

public abstract FeedIterator GetChangeFeedStreamIterator(
Expand Down

Large diffs are not rendered by default.