From e1ef934997a693ec1732018fbb580cc710447264 Mon Sep 17 00:00:00 2001 From: j82w Date: Thu, 12 Dec 2019 01:00:51 -0800 Subject: [PATCH] Bump samples to 3.5.1 and remove old CodeSamples (#1095) * Bump samples to 3.5.1 * Switch to using * to always get the latest nuget version. * Removed deprecated samples --- .../AzureFunctions/AzureFunctions.csproj | 27 - .../AzureFunctionsCosmosClient.cs | 68 -- .../CodeSamples/AzureFunctions/Models/Item.cs | 19 - .../CodeSamples/AzureFunctions/Startup.cs | 43 - .../CodeSamples/AzureFunctions/host.json | 3 - .../AzureFunctions/local.settings.json | 7 - .../ContainerManagement.csproj | 20 - .../ContainerManagement/Program.cs | 227 ------ .../CodeSamples/Cosmos.Samples.sln | 73 -- .../DatabaseManagement.csproj | 20 - .../CodeSamples/DatabaseManagement/Program.cs | 111 --- .../Handlers/ConcurrencyHandler.cs | 27 - .../CodeSamples/Handlers/HandlerSample.csproj | 26 - .../CodeSamples/Handlers/LoggingHandler.cs | 38 - .../CodeSamples/Handlers/Models/Item.cs | 19 - .../CodeSamples/Handlers/Program.cs | 138 ---- .../CodeSamples/Handlers/ThrottlingHandler.cs | 23 - .../ItemManagement/ItemManagement.csproj | 23 - .../CodeSamples/ItemManagement/Program.cs | 743 ------------------ .../NonPartitionContainerMigration.csproj | 23 - .../NonPartitionContainerMigration/Program.cs | 337 -------- .../CodeSamples/NuGet.config | 6 - .../CodeSamples/Queries/Program.cs | 424 ---------- .../CodeSamples/Queries/Queries.csproj | 23 - .../CodeSamples/ServerSideScripts/Data/0.json | 34 - .../CodeSamples/ServerSideScripts/Data/1.json | 34 - .../ServerSideScripts/Data/10.json | 34 - .../ServerSideScripts/Data/11.json | 34 - .../ServerSideScripts/Data/12.json | 34 - .../ServerSideScripts/Data/13.json | 34 - .../ServerSideScripts/Data/14.json | 34 - .../ServerSideScripts/Data/15.json | 34 - .../ServerSideScripts/Data/16.json | 34 - .../ServerSideScripts/Data/17.json | 34 - .../ServerSideScripts/Data/18.json | 34 - .../ServerSideScripts/Data/19.json | 34 - .../CodeSamples/ServerSideScripts/Data/2.json | 34 - .../ServerSideScripts/Data/20.json | 34 - .../ServerSideScripts/Data/21.json | 34 - .../ServerSideScripts/Data/22.json | 34 - .../ServerSideScripts/Data/23.json | 34 - .../ServerSideScripts/Data/24.json | 34 - .../ServerSideScripts/Data/25.json | 34 - .../ServerSideScripts/Data/26.json | 34 - .../ServerSideScripts/Data/27.json | 34 - .../ServerSideScripts/Data/28.json | 34 - .../ServerSideScripts/Data/29.json | 34 - .../CodeSamples/ServerSideScripts/Data/3.json | 34 - .../ServerSideScripts/Data/30.json | 34 - .../ServerSideScripts/Data/31.json | 34 - .../ServerSideScripts/Data/32.json | 34 - .../ServerSideScripts/Data/33.json | 34 - .../ServerSideScripts/Data/34.json | 34 - .../ServerSideScripts/Data/35.json | 34 - .../ServerSideScripts/Data/36.json | 34 - .../ServerSideScripts/Data/37.json | 34 - .../ServerSideScripts/Data/38.json | 34 - .../ServerSideScripts/Data/39.json | 34 - .../CodeSamples/ServerSideScripts/Data/4.json | 34 - .../ServerSideScripts/Data/40.json | 34 - .../ServerSideScripts/Data/41.json | 34 - .../ServerSideScripts/Data/42.json | 34 - .../ServerSideScripts/Data/43.json | 34 - .../ServerSideScripts/Data/44.json | 34 - .../ServerSideScripts/Data/45.json | 34 - .../ServerSideScripts/Data/46.json | 34 - .../ServerSideScripts/Data/47.json | 34 - .../ServerSideScripts/Data/48.json | 34 - .../ServerSideScripts/Data/49.json | 34 - .../CodeSamples/ServerSideScripts/Data/5.json | 34 - .../ServerSideScripts/Data/50.json | 34 - .../ServerSideScripts/Data/51.json | 34 - .../ServerSideScripts/Data/52.json | 34 - .../ServerSideScripts/Data/53.json | 34 - .../ServerSideScripts/Data/54.json | 34 - .../ServerSideScripts/Data/55.json | 34 - .../ServerSideScripts/Data/56.json | 34 - .../ServerSideScripts/Data/57.json | 34 - .../ServerSideScripts/Data/58.json | 34 - .../ServerSideScripts/Data/59.json | 34 - .../CodeSamples/ServerSideScripts/Data/6.json | 34 - .../ServerSideScripts/Data/60.json | 34 - .../ServerSideScripts/Data/61.json | 34 - .../ServerSideScripts/Data/62.json | 34 - .../ServerSideScripts/Data/63.json | 34 - .../ServerSideScripts/Data/64.json | 34 - .../ServerSideScripts/Data/65.json | 34 - .../ServerSideScripts/Data/66.json | 34 - .../ServerSideScripts/Data/67.json | 34 - .../ServerSideScripts/Data/68.json | 34 - .../ServerSideScripts/Data/69.json | 34 - .../CodeSamples/ServerSideScripts/Data/7.json | 34 - .../ServerSideScripts/Data/70.json | 34 - .../ServerSideScripts/Data/71.json | 34 - .../ServerSideScripts/Data/72.json | 34 - .../ServerSideScripts/Data/73.json | 34 - .../ServerSideScripts/Data/74.json | 34 - .../ServerSideScripts/Data/75.json | 34 - .../ServerSideScripts/Data/76.json | 34 - .../ServerSideScripts/Data/77.json | 34 - .../ServerSideScripts/Data/78.json | 34 - .../ServerSideScripts/Data/79.json | 34 - .../CodeSamples/ServerSideScripts/Data/8.json | 34 - .../ServerSideScripts/Data/80.json | 34 - .../ServerSideScripts/Data/81.json | 34 - .../ServerSideScripts/Data/82.json | 34 - .../ServerSideScripts/Data/83.json | 34 - .../ServerSideScripts/Data/84.json | 34 - .../ServerSideScripts/Data/85.json | 34 - .../ServerSideScripts/Data/86.json | 34 - .../ServerSideScripts/Data/87.json | 34 - .../ServerSideScripts/Data/88.json | 34 - .../ServerSideScripts/Data/89.json | 34 - .../CodeSamples/ServerSideScripts/Data/9.json | 34 - .../ServerSideScripts/Data/90.json | 34 - .../ServerSideScripts/Data/91.json | 34 - .../ServerSideScripts/Data/92.json | 34 - .../ServerSideScripts/Data/93.json | 34 - .../ServerSideScripts/Data/94.json | 34 - .../ServerSideScripts/Data/95.json | 34 - .../ServerSideScripts/Data/96.json | 34 - .../ServerSideScripts/Data/97.json | 34 - .../ServerSideScripts/Data/98.json | 34 - .../ServerSideScripts/Data/99.json | 34 - .../ServerSideScripts/JS/BulkImport.js | 76 -- .../ServerSideScripts/JS/OrderBy.js | 128 --- .../ServerSideScripts/JS/SimpleScript.js | 33 - .../CodeSamples/ServerSideScripts/Program.cs | 365 --------- .../ServerSideScripts.csproj | 333 -------- .../CodeSamples/Shared/Metadata.cs | 28 - .../CodeSamples/Shared/SalesOrder.cs | 113 --- .../CodeSamples/Shared/Shared.csproj | 11 - .../CodeSamples/appSettings.json | 4 - .../AzureFunctions/AzureFunctions.csproj | 6 +- .../Usage/BulkSupport/BulkSupport.csproj | 4 +- .../Usage/ChangeFeed/ChangeFeed.csproj | 4 +- .../ContainerManagement.csproj | 4 +- .../CustomSerialization.csproj | 4 +- .../DatabaseManagement.csproj | 4 +- .../Usage/Handlers/HandlerSample.csproj | 4 +- .../IndexManagement/IndexManagement.csproj | 4 +- .../ItemManagement/ItemManagement.csproj | 4 +- .../NonPartitionContainerMigration.csproj | 4 +- .../Usage/Queries/Queries.csproj | 4 +- .../ServerSideScripts.csproj | 4 +- .../TransactionalBatch.csproj | 4 +- 146 files changed, 27 insertions(+), 6986 deletions(-) delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/AzureFunctions.csproj delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/AzureFunctionsCosmosClient.cs delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/Models/Item.cs delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/Startup.cs delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/host.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/local.settings.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ContainerManagement/ContainerManagement.csproj delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ContainerManagement/Program.cs delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/Cosmos.Samples.sln delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/DatabaseManagement/DatabaseManagement.csproj delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/DatabaseManagement/Program.cs delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/ConcurrencyHandler.cs delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/HandlerSample.csproj delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/LoggingHandler.cs delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/Models/Item.cs delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/Program.cs delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/ThrottlingHandler.cs delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ItemManagement/ItemManagement.csproj delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ItemManagement/Program.cs delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/NonPartitionContainerMigration/NonPartitionContainerMigration.csproj delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/NonPartitionContainerMigration/Program.cs delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/NuGet.config delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/Queries/Program.cs delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/Queries/Queries.csproj delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/0.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/1.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/10.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/11.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/12.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/13.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/14.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/15.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/16.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/17.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/18.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/19.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/2.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/20.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/21.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/22.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/23.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/24.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/25.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/26.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/27.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/28.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/29.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/3.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/30.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/31.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/32.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/33.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/34.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/35.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/36.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/37.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/38.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/39.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/4.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/40.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/41.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/42.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/43.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/44.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/45.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/46.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/47.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/48.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/49.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/5.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/50.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/51.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/52.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/53.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/54.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/55.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/56.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/57.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/58.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/59.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/6.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/60.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/61.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/62.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/63.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/64.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/65.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/66.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/67.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/68.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/69.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/7.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/70.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/71.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/72.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/73.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/74.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/75.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/76.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/77.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/78.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/79.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/8.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/80.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/81.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/82.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/83.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/84.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/85.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/86.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/87.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/88.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/89.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/9.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/90.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/91.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/92.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/93.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/94.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/95.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/96.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/97.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/98.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/99.json delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/JS/BulkImport.js delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/JS/OrderBy.js delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/JS/SimpleScript.js delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Program.cs delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/ServerSideScripts.csproj delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/Shared/Metadata.cs delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/Shared/SalesOrder.cs delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/Shared/Shared.csproj delete mode 100644 Microsoft.Azure.Cosmos.Samples/CodeSamples/appSettings.json diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/AzureFunctions.csproj b/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/AzureFunctions.csproj deleted file mode 100644 index eb5580c56..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/AzureFunctions.csproj +++ /dev/null @@ -1,27 +0,0 @@ - - - netcoreapp2.1 - v2 - Cosmos.Samples.AzureFunctions - Cosmos.Samples.AzureFunctions - - - - PreserveNewest - - - - - - - - - - PreserveNewest - - - PreserveNewest - Never - - - \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/AzureFunctionsCosmosClient.cs b/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/AzureFunctionsCosmosClient.cs deleted file mode 100644 index b98cd66e2..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/AzureFunctionsCosmosClient.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.IO; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Azure.Cosmos; -using Microsoft.Azure.WebJobs; -using Microsoft.Azure.WebJobs.Extensions.Http; -using Microsoft.Extensions.Logging; -using Newtonsoft.Json; - -namespace Cosmos.Samples.AzureFunctions -{ - // ---------------------------------------------------------------------------------------------------------- - // Prerequisites - - // - // 1. An Azure Cosmos account - - // https://azure.microsoft.com/en-us/itemation/articles/itemdb-create-account/ - // - // 2. Microsoft.Azure.Cosmos NuGet package - - // http://www.nuget.org/packages/Microsoft.Azure.Cosmos/ - // ---------------------------------------------------------------------------------------------------------- - // Sample - demonstrates how to maintain a Cosmos client and reuse the instance among Azure Function executions. - // - // More information: https://github.com/Azure/azure-functions-host/wiki/Managing-Connections - - public class AzureFunctionsCosmosClient - { - private CosmosClient cosmosClient; - public AzureFunctionsCosmosClient(CosmosClient cosmosClient) - { - this.cosmosClient = cosmosClient; - } - - - [FunctionName("CosmosClient")] - public async Task Run( - [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req, - ILogger log) - { - log.LogInformation("C# HTTP trigger function processed a request."); - - string requestBody = await new StreamReader(req.Body).ReadToEndAsync(); - Item data = JsonConvert.DeserializeObject(requestBody); - if (data == null) - { - return new BadRequestObjectResult($"Cannot parse body."); - } - - if (string.IsNullOrEmpty(data.Id)) - { - data.Id = Guid.NewGuid().ToString(); - } - - var container = this.cosmosClient.GetContainer("mydb", "mycoll"); - - try - { - var result = await container.CreateItemAsync(data, new PartitionKey(data.Id)); - return new OkObjectResult(result.Resource.Id); - } - catch (CosmosException cosmosException) - { - return new BadRequestObjectResult($"Failed to create item. Cosmos Status Code {cosmosException.StatusCode}, Sub Status Code {cosmosException.SubStatusCode}: {cosmosException.Message}."); - } - } - } -} diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/Models/Item.cs b/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/Models/Item.cs deleted file mode 100644 index 8243f2dad..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/Models/Item.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Newtonsoft.Json; - -namespace Cosmos.Samples.AzureFunctions -{ - public class Item - { - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - [JsonProperty(PropertyName = "isComplete")] - public bool Completed { get; set; } - } -} diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/Startup.cs b/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/Startup.cs deleted file mode 100644 index f2105ce64..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/Startup.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using Microsoft.Azure.Cosmos; -using Microsoft.Azure.Cosmos.Fluent; -using Microsoft.Azure.Functions.Extensions.DependencyInjection; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; - -[assembly: FunctionsStartup(typeof(Cosmos.Samples.AzureFunctions.Startup))] - -namespace Cosmos.Samples.AzureFunctions -{ - public class Startup : FunctionsStartup - { - private static IConfigurationRoot configuration = new ConfigurationBuilder() - .SetBasePath(Environment.CurrentDirectory) - .AddJsonFile("AppSettings.json", optional: true, reloadOnChange: true) - .AddEnvironmentVariables() - .Build(); - - public override void Configure(IFunctionsHostBuilder builder) - { - // Register the CosmosClient as a Singleton - - builder.Services.AddSingleton((s) => { - string endpoint = configuration["EndPointUrl"]; - if (string.IsNullOrEmpty(endpoint)) - { - throw new ArgumentNullException("Please specify a valid endpoint in the appSettings.json file or your Azure Functions Settings."); - } - - string authKey = configuration["AuthorizationKey"]; - if (string.IsNullOrEmpty(authKey) || string.Equals(authKey, "Super secret key")) - { - throw new ArgumentException("Please specify a valid AuthorizationKey in the appSettings.json file or your Azure Functions Settings."); - } - - CosmosClientBuilder configurationBuilder = new CosmosClientBuilder(endpoint, authKey); - return configurationBuilder - .Build(); - }); - } - } -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/host.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/host.json deleted file mode 100644 index b9f92c0de..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/host.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "version": "2.0" -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/local.settings.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/local.settings.json deleted file mode 100644 index 4fce9ff39..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/AzureFunctions/local.settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "IsEncrypted": false, - "Values": { - "AzureWebJobsStorage": "UseDevelopmentStorage=true", - "FUNCTIONS_WORKER_RUNTIME": "dotnet" - } -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ContainerManagement/ContainerManagement.csproj b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ContainerManagement/ContainerManagement.csproj deleted file mode 100644 index 0e4f05d4e..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ContainerManagement/ContainerManagement.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - Exe - netcoreapp2.1 - latest - - - - - - - - - - - PreserveNewest - - - diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ContainerManagement/Program.cs b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ContainerManagement/Program.cs deleted file mode 100644 index 794b17625..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ContainerManagement/Program.cs +++ /dev/null @@ -1,227 +0,0 @@ -namespace Cosmos.Samples.Shared -{ - using System; - using System.Threading.Tasks; - using Microsoft.Azure.Cosmos; - using Microsoft.Extensions.Configuration; - - class Program - { - //Read configuration - private static readonly string databaseId = "samples"; - private static readonly string containerId = "container-samples"; - private static readonly string partitionKey = "/activityId"; - - private static Database database = null; - - // Async main requires c# 7.1 which is set in the csproj with the LangVersion attribute - //
- public static async Task Main(string[] args) - { - try - { - IConfigurationRoot configuration = new ConfigurationBuilder() - .AddJsonFile("appSettings.json") - .Build(); - - string endpoint = configuration["EndPointUrl"]; - if (string.IsNullOrEmpty(endpoint)) - { - throw new ArgumentNullException("Please specify a valid endpoint in the appSettings.json"); - } - - string authKey = configuration["AuthorizationKey"]; - if (string.IsNullOrEmpty(authKey) || string.Equals(authKey, "Super secret key")) - { - throw new ArgumentException("Please specify a valid AuthorizationKey in the appSettings.json"); - } - - //Read the Cosmos endpointUrl and authorisationKeys from configuration - //These values are available from the Azure Management Portal on the Cosmos Account Blade under "Keys" - //NB > Keep these values in a safe & secure location. Together they provide Administrative access to your Cosmos account - using (CosmosClient client = new CosmosClient(endpoint, authKey)) - { - await Program.RunContainerDemo(client); - } - } - catch (CosmosException cre) - { - Console.WriteLine(cre.ToString()); - } - catch (Exception e) - { - Exception baseException = e.GetBaseException(); - Console.WriteLine("Error: {0}, Message: {1}", e.Message, baseException.Message); - } - finally - { - Console.WriteLine("End of demo, press any key to exit."); - Console.ReadKey(); - } - } - //
- - /// - /// Run through basic container access methods as a console app demo. - /// - /// - // - private static async Task RunContainerDemo(CosmosClient client) - { - // Create the database if necessary - await Program.Setup(client); - - Container simpleContainer = await Program.CreateContainer(); - - await Program.CreateContainerWithCustomIndexingPolicy(); - - await Program.CreateContainerWithTtlExpiration(); - - await Program.GetAndChangeContainerPerformance(simpleContainer); - - await Program.ReadContainerProperties(); - - await Program.ListContainersInDatabase(); - - // Uncomment to delete container! - // await Program.DeleteContainer(); - } - // - - private static async Task Setup(CosmosClient client) - { - database = await client.CreateDatabaseIfNotExistsAsync(databaseId); - } - - // - private static async Task CreateContainer() - { - // Set throughput to the minimum value of 400 RU/s - ContainerResponse simpleContainer = await database.CreateContainerIfNotExistsAsync( - id: containerId, - partitionKeyPath: partitionKey, - throughput: 400); - - Console.WriteLine($"\n1.1. Created container :{simpleContainer.Container.Id}"); - return simpleContainer; - } - // - - // - private static async Task CreateContainerWithCustomIndexingPolicy() - { - // Create a container with custom index policy (consistent indexing) - // We cover index policies in detail in IndexManagement sample project - ContainerProperties containerProperties = new ContainerProperties( - id: "SampleContainerWithCustomIndexPolicy", - partitionKeyPath: partitionKey); - containerProperties.IndexingPolicy.IndexingMode = IndexingMode.Consistent; - - Container containerWithConsistentIndexing = await database.CreateContainerIfNotExistsAsync( - containerProperties, - throughput: 400); - - Console.WriteLine($"1.2. Created Container {containerWithConsistentIndexing.Id}, with custom index policy \n"); - - await containerWithConsistentIndexing.DeleteContainerAsync(); - } - // - - // - private static async Task CreateContainerWithTtlExpiration() - { - ContainerProperties properties = new ContainerProperties - (id: "TtlExpiryContainer", - partitionKeyPath: partitionKey); - properties.DefaultTimeToLive = (int)TimeSpan.FromDays(1).TotalSeconds; //expire in 1 day - - ContainerResponse ttlEnabledContainerResponse = await database.CreateContainerIfNotExistsAsync( - containerProperties: properties); - ContainerProperties returnedProperties = ttlEnabledContainerResponse; - - Console.WriteLine($"\n1.3. Created Container \n{returnedProperties.Id} with TTL expiration of {returnedProperties.DefaultTimeToLive}"); - - await ttlEnabledContainerResponse.Container.DeleteContainerAsync(); - } - // - - // - private static async Task GetAndChangeContainerPerformance(Container simpleContainer) - { - - //********************************************************************************************* - // Get configured performance (reserved throughput) of a CosmosContainer - //********************************************************************************************** - int? throughputResponse = await simpleContainer.ReadThroughputAsync(); - - Console.WriteLine($"\n2. Found throughput \n{throughputResponse}\nusing container's id \n{simpleContainer.Id}"); - - //****************************************************************************************************************** - // Change performance (reserved throughput) of CosmosContainer - // Let's change the performance of the container to 500 RU/s - //****************************************************************************************************************** - - await simpleContainer.ReplaceThroughputAsync(500); - - Console.WriteLine("\n3. Replaced throughput. Throughput is now 500.\n"); - - // Get the offer again after replace - throughputResponse = await simpleContainer.ReadThroughputAsync(); - - Console.WriteLine($"3. Found throughput \n{throughputResponse}\n using container's ResourceId {simpleContainer.Id}.\n"); - } - // - - // - private static async Task ReadContainerProperties() - { - //************************************************* - // Get a CosmosContainer by its Id property - //************************************************* - Container container = database.GetContainer(containerId); - ContainerProperties containerProperties = await container.ReadContainerAsync(); - - Console.WriteLine($"\n4. Found Container \n{containerProperties.Id}\n"); - } - // - - /// - /// List the container within a database by calling the GetContainerIterator (scan) API. - /// - /// - // - private static async Task ListContainersInDatabase() - { - Console.WriteLine("\n5. Reading all CosmosContainer resources for a database"); - - FeedIterator resultSetIterator = database.GetContainerQueryIterator(); - while (resultSetIterator.HasMoreResults) - { - foreach (ContainerProperties container in await resultSetIterator.ReadNextAsync()) - { - Console.WriteLine(container.Id); - } - } - } - // - - /// - /// Delete a container - /// - /// - // - private static async Task DeleteContainer() - { - await database.GetContainer(containerId).DeleteContainerAsync(); - Console.WriteLine("\n6. Deleted Container\n"); - } - // - } - - public class ToDoActivity - { - public string id = null; - public string activityId = null; - public string status = null; - } -} diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Cosmos.Samples.sln b/Microsoft.Azure.Cosmos.Samples/CodeSamples/Cosmos.Samples.sln deleted file mode 100644 index 9501bc99c..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Cosmos.Samples.sln +++ /dev/null @@ -1,73 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28010.2041 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DatabaseManagement", "DatabaseManagement\DatabaseManagement.csproj", "{F972386A-B03D-4453-88C7-948CB107C029}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ContainerManagement", "ContainerManagement\ContainerManagement.csproj", "{6ACA3641-A6DB-4D19-AC3F-F43A69DFB52F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ItemManagement", "ItemManagement\ItemManagement.csproj", "{FF1C9654-E125-47ED-8EC1-E82156D5EED3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shared", "Shared\Shared.csproj", "{5A9CFB9C-7261-4DE9-9CCB-A8A6D0207B83}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Queries", "Queries\Queries.csproj", "{107BAEC4-BF37-4872-9193-AEE6F0A947E1}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerSideScripts", "ServerSideScripts\ServerSideScripts.csproj", "{7FCC3B73-85FC-42A7-96AB-3D508BB871BD}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HandlerSample", "Handlers\HandlerSample.csproj", "{DAE99683-1049-4E8F-9580-5C9B5562D9A7}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzureFunctions", "AzureFunctions\AzureFunctions.csproj", "{4D375AAB-E67E-4A0C-9418-F512F705C574}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NonPartitionContainerMigration", "NonPartitionContainerMigration\NonPartitionContainerMigration.csproj", "{C1A42351-39FC-4600-A235-FF5A90B02628}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F972386A-B03D-4453-88C7-948CB107C029}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F972386A-B03D-4453-88C7-948CB107C029}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F972386A-B03D-4453-88C7-948CB107C029}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F972386A-B03D-4453-88C7-948CB107C029}.Release|Any CPU.Build.0 = Release|Any CPU - {6ACA3641-A6DB-4D19-AC3F-F43A69DFB52F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6ACA3641-A6DB-4D19-AC3F-F43A69DFB52F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6ACA3641-A6DB-4D19-AC3F-F43A69DFB52F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6ACA3641-A6DB-4D19-AC3F-F43A69DFB52F}.Release|Any CPU.Build.0 = Release|Any CPU - {FF1C9654-E125-47ED-8EC1-E82156D5EED3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FF1C9654-E125-47ED-8EC1-E82156D5EED3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FF1C9654-E125-47ED-8EC1-E82156D5EED3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FF1C9654-E125-47ED-8EC1-E82156D5EED3}.Release|Any CPU.Build.0 = Release|Any CPU - {5A9CFB9C-7261-4DE9-9CCB-A8A6D0207B83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5A9CFB9C-7261-4DE9-9CCB-A8A6D0207B83}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5A9CFB9C-7261-4DE9-9CCB-A8A6D0207B83}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5A9CFB9C-7261-4DE9-9CCB-A8A6D0207B83}.Release|Any CPU.Build.0 = Release|Any CPU - {107BAEC4-BF37-4872-9193-AEE6F0A947E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {107BAEC4-BF37-4872-9193-AEE6F0A947E1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {107BAEC4-BF37-4872-9193-AEE6F0A947E1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {107BAEC4-BF37-4872-9193-AEE6F0A947E1}.Release|Any CPU.Build.0 = Release|Any CPU - {7FCC3B73-85FC-42A7-96AB-3D508BB871BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7FCC3B73-85FC-42A7-96AB-3D508BB871BD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7FCC3B73-85FC-42A7-96AB-3D508BB871BD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7FCC3B73-85FC-42A7-96AB-3D508BB871BD}.Release|Any CPU.Build.0 = Release|Any CPU - {DAE99683-1049-4E8F-9580-5C9B5562D9A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DAE99683-1049-4E8F-9580-5C9B5562D9A7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DAE99683-1049-4E8F-9580-5C9B5562D9A7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DAE99683-1049-4E8F-9580-5C9B5562D9A7}.Release|Any CPU.Build.0 = Release|Any CPU - {4D375AAB-E67E-4A0C-9418-F512F705C574}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4D375AAB-E67E-4A0C-9418-F512F705C574}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4D375AAB-E67E-4A0C-9418-F512F705C574}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4D375AAB-E67E-4A0C-9418-F512F705C574}.Release|Any CPU.Build.0 = Release|Any CPU - {C1A42351-39FC-4600-A235-FF5A90B02628}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C1A42351-39FC-4600-A235-FF5A90B02628}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C1A42351-39FC-4600-A235-FF5A90B02628}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C1A42351-39FC-4600-A235-FF5A90B02628}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {BB174784-6D22-454F-9F1C-7DE233164C11} - EndGlobalSection -EndGlobal diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/DatabaseManagement/DatabaseManagement.csproj b/Microsoft.Azure.Cosmos.Samples/CodeSamples/DatabaseManagement/DatabaseManagement.csproj deleted file mode 100644 index 0e4f05d4e..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/DatabaseManagement/DatabaseManagement.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - Exe - netcoreapp2.1 - latest - - - - - - - - - - - PreserveNewest - - - diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/DatabaseManagement/Program.cs b/Microsoft.Azure.Cosmos.Samples/CodeSamples/DatabaseManagement/Program.cs deleted file mode 100644 index 1b0ac8766..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/DatabaseManagement/Program.cs +++ /dev/null @@ -1,111 +0,0 @@ -namespace Cosmos.Samples.Shared -{ - using System; - using System.Threading.Tasks; - using Microsoft.Azure.Cosmos; - using Microsoft.Extensions.Configuration; - - internal class Program - { - //Read configuration - private static readonly string databaseId = "samples"; - - // Async main requires c# 7.1 which is set in the csproj with the LangVersion attribute - //
- public static async Task Main(string[] args) - { - try - { - IConfigurationRoot configuration = new ConfigurationBuilder() - .AddJsonFile("appSettings.json") - .Build(); - - string endpoint = configuration["EndPointUrl"]; - if (string.IsNullOrEmpty(endpoint)) - { - throw new ArgumentNullException("Please specify a valid endpoint in the appSettings.json"); - } - - string authKey = configuration["AuthorizationKey"]; - if (string.IsNullOrEmpty(authKey) || string.Equals(authKey, "Super secret key")) - { - throw new ArgumentException("Please specify a valid AuthorizationKey in the appSettings.json"); - } - - //Read the Cosmos endpointUrl and authorisationKeys from configuration - //These values are available from the Azure Management Portal on the Cosmos Account Blade under "Keys" - //NB > Keep these values in a safe & secure location. Together they provide Administrative access to your Cosmos account - using (CosmosClient client = new CosmosClient(endpoint, authKey)) - { - await Program.RunDatabaseDemo(client); - } - } - catch (CosmosException cre) - { - Console.WriteLine(cre.ToString()); - } - catch (Exception e) - { - Exception baseException = e.GetBaseException(); - Console.WriteLine("Error: {0}, Message: {1}", e.Message, baseException.Message); - } - finally - { - Console.WriteLine("End of demo, press any key to exit."); - Console.ReadKey(); - } - } - //
- - /// - /// Run basic database meta data operations as a console application. - /// - /// - // - private static async Task RunDatabaseDemo(CosmosClient client) - { - // An object containing relevant information about the response - DatabaseResponse databaseResponse = await client.CreateDatabaseIfNotExistsAsync(databaseId, 10000); - - // A client side reference object that allows additional operations like ReadAsync - Database database = databaseResponse; - - // The response from Azure Cosmos - DatabaseProperties properties = databaseResponse; - - Console.WriteLine($"\n1. Create a database resource with id: {properties.Id} and last modified time stamp: {properties.LastModified}"); - Console.WriteLine($"\n2. Create a database resource request charge: {databaseResponse.RequestCharge} and Activity Id: {databaseResponse.ActivityId}"); - - // Read the database from Azure Cosmos - DatabaseResponse readResponse = await database.ReadAsync(); - Console.WriteLine($"\n3. Read a database: {readResponse.Resource.Id}"); - - await readResponse.Database.CreateContainerAsync("testContainer", "/pk"); - - // Get the current throughput for the database - int? throughputResponse = await database.ReadThroughputAsync(); - if (throughputResponse.HasValue) - { - Console.WriteLine($"\n4. Read a database throughput: {throughputResponse}"); - - // Update the current throughput for the database - await database.ReplaceThroughputAsync(11000); - } - - Console.WriteLine("\n5. Reading all databases resources for an account"); - FeedIterator iterator = client.GetDatabaseQueryIterator(); - do - { - foreach (DatabaseProperties db in await iterator.ReadNextAsync()) - { - Console.WriteLine(db.Id); - } - } while (iterator.HasMoreResults); - - // Delete the database from Azure Cosmos. - await database.DeleteAsync(); - Console.WriteLine($"\n6. Database {database.Id} deleted."); - } - // - } -} diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/ConcurrencyHandler.cs b/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/ConcurrencyHandler.cs deleted file mode 100644 index c1c80cbc7..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/ConcurrencyHandler.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace Cosmos.Samples.Handlers -{ - using System.Threading; - using System.Threading.Tasks; - using Microsoft.Azure.Cosmos; - - /// - /// Handler that detects concurrency and etag issues - /// - class ConcurrencyHandler : RequestHandler - { - public override async Task SendAsync( - RequestMessage request, - CancellationToken cancellationToken) - { - - ResponseMessage response = await base.SendAsync(request, cancellationToken); - - if (response.StatusCode == System.Net.HttpStatusCode.PreconditionFailed) - { - response.Headers.Set("x-ms-substatus", "999"); - } - - return response; - } - } -} diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/HandlerSample.csproj b/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/HandlerSample.csproj deleted file mode 100644 index f3c45e27a..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/HandlerSample.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - Exe - netcoreapp2.1 - latest - Cosmos.Samples.Handlers - Cosmos.Samples.Handlers - - - - - PreserveNewest - - - - - - - - - - - - - diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/LoggingHandler.cs b/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/LoggingHandler.cs deleted file mode 100644 index cc463f75d..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/LoggingHandler.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace Cosmos.Samples.Handlers -{ - using System.Threading; - using System.Threading.Tasks; - using Microsoft.ApplicationInsights; - using Microsoft.ApplicationInsights.DataContracts; - using Microsoft.Azure.Cosmos; - - /// - /// This handler will send telemetry to Application Insights - /// - class LoggingHandler : RequestHandler - { - private readonly TelemetryClient telemetryClient; - public LoggingHandler() - { - this.telemetryClient = new TelemetryClient(); - } - - public override async Task SendAsync( - RequestMessage request, - CancellationToken cancellationToken) - { - - using (Microsoft.ApplicationInsights.Extensibility.IOperationHolder operation = this.telemetryClient.StartOperation("CosmosDBRequest")) - { - this.telemetryClient.TrackTrace($"{request.Method.Method} - {request.RequestUri.ToString()}"); - ResponseMessage response = await base.SendAsync(request, cancellationToken); - - operation.Telemetry.ResponseCode = ((int)response.StatusCode).ToString(); - operation.Telemetry.Success = response.IsSuccessStatusCode; - - this.telemetryClient.StopOperation(operation); - return response; - } - } - } -} diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/Models/Item.cs b/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/Models/Item.cs deleted file mode 100644 index 20ee35131..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/Models/Item.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Newtonsoft.Json; - -namespace Cosmos.Samples.Handlers.Models -{ - public class Item - { - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - [JsonProperty(PropertyName = "isComplete")] - public bool Completed { get; set; } - } -} diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/Program.cs b/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/Program.cs deleted file mode 100644 index f62fd119d..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/Program.cs +++ /dev/null @@ -1,138 +0,0 @@ -namespace Cosmos.Samples.Handlers -{ - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Linq; - using System.Threading.Tasks; - using Cosmos.Samples.Handlers.Models; - using Microsoft.Azure.Cosmos; - using Microsoft.Extensions.Configuration; - using Microsoft.Azure.Cosmos.Fluent; - - // ---------------------------------------------------------------------------------------------------------- - // Prerequisites - - // - // 1. An Azure Cosmos account - - // https://azure.microsoft.com/en-us/itemation/articles/itemdb-create-account/ - // - // 2. Microsoft.Azure.Cosmos NuGet package - - // http://www.nuget.org/packages/Microsoft.Azure.Cosmos/ - // ---------------------------------------------------------------------------------------------------------- - // Sample - demonstrates how to work with custom Handlers in the SDK pipeline - // - // 1. LoggingHandler that will log all requests to Application Insights - // 2. ConcurrencyHandler that will act upon requests that violate ETag concurrency - // 3. ThrottlingHandler that will use Polly to handle retries on 429s - - - public class Program - { - // Async main requires c# 7.1 which is set in the csproj with the LangVersion attribute - //
- public static async Task Main(string[] args) - { - IConfigurationRoot configuration = new ConfigurationBuilder() - .AddJsonFile("appSettings.json") - .Build(); - - string endpoint = configuration["EndPointUrl"]; - if (string.IsNullOrEmpty(endpoint)) - { - throw new ArgumentNullException("Please specify a valid endpoint in the appSettings.json"); - } - - string authKey = configuration["AuthorizationKey"]; - if (string.IsNullOrEmpty(authKey) || string.Equals(authKey, "Super secret key")) - { - throw new ArgumentException("Please specify a valid AuthorizationKey in the appSettings.json"); - } - - // Connecting to Emulator. Change if you want a live account - CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder(endpoint, authKey); - - cosmosClientBuilder.AddCustomHandlers( - new LoggingHandler(), - new ConcurrencyHandler(), - new ThrottlingHandler() - ); - - CosmosClient client = cosmosClientBuilder.Build(); - - DatabaseResponse databaseResponse = await client.CreateDatabaseIfNotExistsAsync("mydb"); - Database database = databaseResponse.Database; - - ContainerResponse containerResponse = await database.CreateContainerIfNotExistsAsync("mycoll", "/id"); - Container container = containerResponse.Container; - - Item item = new Item() - { - Id = Guid.NewGuid().ToString(), - Name = "Test Item", - Description = "Some random test item", - Completed = false - }; - - // Create - await container.CreateItemAsync(item, new PartitionKey(item.Id)); - - item.Completed = true; - - // Replace - await container.ReplaceItemAsync(item, item.Id, new PartitionKey(item.Id)); - - // Querying - FeedIterator query = container.GetItemQueryIterator(new QueryDefinition("SELECT * FROM c"), requestOptions: new QueryRequestOptions() { MaxConcurrency = 1}); - List results = new List(); - while (query.HasMoreResults) - { - FeedResponse response = await query.ReadNextAsync(); - - results.AddRange(response.ToList()); - } - - // Read Item - - ItemResponse cosmosItemResponse = await container.ReadItemAsync(item.Id, new PartitionKey(item.Id)); - - ItemRequestOptions itemRequestOptions = new ItemRequestOptions() - { - IfMatchEtag = cosmosItemResponse.ETag - }; - - // Concurrency - - List>> tasks = new List>> - { - UpdateItemForConcurrency(container, itemRequestOptions, item), - UpdateItemForConcurrency(container, itemRequestOptions, item) - }; - - try - { - await Task.WhenAll(tasks); - } - catch (CosmosException ex) - { - // Verify that our custom handler caught the scenario - Debug.Assert(999.Equals(ex.SubStatusCode)); - } - - // Delete - await container.DeleteItemAsync(item.Id, new PartitionKey(item.Id)); - } - //
- - // - private static Task> UpdateItemForConcurrency(Container container, ItemRequestOptions itemRequestOptions, Item item) - { - item.Description = $"Updating description {Guid.NewGuid().ToString()}"; - return container.ReplaceItemAsync( - item, - item.Id, - new PartitionKey(item.Id), - itemRequestOptions); - } - // - } -} diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/ThrottlingHandler.cs b/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/ThrottlingHandler.cs deleted file mode 100644 index 039d72e7d..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Handlers/ThrottlingHandler.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace Cosmos.Samples.Handlers -{ - using System.Threading; - using System.Threading.Tasks; - using Microsoft.Azure.Cosmos; - using Polly; - - /// - /// Using Polly to retry on Throttles. - /// - class ThrottlingHandler : RequestHandler - { - public override Task SendAsync( - RequestMessage request, - CancellationToken cancellationToken) - { - return Policy - .HandleResult(r => (int)r.StatusCode == 429) - .RetryAsync(3) - .ExecuteAsync(() => base.SendAsync(request, cancellationToken)); - } - } -} diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ItemManagement/ItemManagement.csproj b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ItemManagement/ItemManagement.csproj deleted file mode 100644 index 1efa0299b..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ItemManagement/ItemManagement.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - Exe - netcoreapp2.1 - latest - - - - - - - - - - - - - - PreserveNewest - - - diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ItemManagement/Program.cs b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ItemManagement/Program.cs deleted file mode 100644 index 9d7e5761f..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ItemManagement/Program.cs +++ /dev/null @@ -1,743 +0,0 @@ -namespace Cosmos.Samples.Shared -{ - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.IO; - using System.Linq; - using System.Net; - using System.Text; - using System.Threading.Tasks; - using Microsoft.Azure.Cosmos; - using Microsoft.Extensions.Configuration; - using Newtonsoft.Json; - - // ---------------------------------------------------------------------------------------------------------- - // Prerequisites - - // - // 1. An Azure Cosmos account - - // https://azure.microsoft.com/en-us/itemation/articles/itemdb-create-account/ - // - // 2. Microsoft.Azure.Cosmos NuGet package - - // http://www.nuget.org/packages/Microsoft.Azure.Cosmos/ - // ---------------------------------------------------------------------------------------------------------- - // Sample - demonstrates the basic CRUD operations on a Item resource for Azure Cosmos - // - // 1. Basic CRUD operations on a item using regular POCOs - // 1.1 - Create a item - // 1.2 - Read a item by its Id - // 1.3 - Read all items in a Collection - // 1.4 - Query for items by a property other than Id - // 1.5 - Replace a item - // 1.6 - Upsert a item - // 1.7 - Delete a item - // - // 2. Work with dynamic objects - // - // 3. Using ETags to control execution - // 3.1 - Use ETag with ReplaceItem for optimistic concurrency - // 3.2 - Use ETag with ReadItem to only return a result if the ETag of the request does not match - // - // 4 - Access items system defined properties - //----------------------------------------------------------------------------------------------------------- - // See Also - - // - // Cosmos.Samples.Queries - We only included a VERY basic query here for completeness, - // For a detailed exploration of how to query for Items, - // including how to paginate results of queries. - // - // Cosmos.Samples.ServerSideScripts - In these examples we do simple loops to create small numbers - // of items. For insert operations where you are creating many - // items we recommend using a Stored Procedure and pass batches - // of new items to this sproc. Consult this sample for an example - // of a BulkInsert stored procedure. - // ---------------------------------------------------------------------------------------------------------- - - public class Program - { - private static readonly string databaseId = "samples"; - private static readonly string containerId = "item-samples"; - private static readonly JsonSerializer Serializer = new JsonSerializer(); - - //Reusable instance of ItemClient which represents the connection to a Cosmos endpoint - private static Database database = null; - private static Container container = null; - - // Async main requires c# 7.1 which is set in the csproj with the LangVersion attribute - //
- public static async Task Main(string[] args) - { - try - { - IConfigurationRoot configuration = new ConfigurationBuilder() - .AddJsonFile("appSettings.json") - .Build(); - - string endpoint = configuration["EndPointUrl"]; - if (string.IsNullOrEmpty(endpoint)) - { - throw new ArgumentNullException("Please specify a valid endpoint in the appSettings.json"); - } - - string authKey = configuration["AuthorizationKey"]; - if (string.IsNullOrEmpty(authKey) || string.Equals(authKey, "Super secret key")) - { - throw new ArgumentException("Please specify a valid AuthorizationKey in the appSettings.json"); - } - - //Read the Cosmos endpointUrl and authorisationKeys from configuration - //These values are available from the Azure Management Portal on the Cosmos Account Blade under "Keys" - //NB > Keep these values in a safe & secure location. Together they provide Administrative access to your Cosmos account - using (CosmosClient client = new CosmosClient(endpoint, authKey)) - { - await Program.Initialize(client); - await Program.RunItemsDemo(); - await Program.Cleanup(); - } - } - catch (CosmosException cre) - { - Console.WriteLine(cre.ToString()); - } - catch (Exception e) - { - Exception baseException = e.GetBaseException(); - Console.WriteLine("Error: {0}, Message: {1}", e.Message, baseException.Message); - } - finally - { - if (Debugger.IsAttached) - { - Console.WriteLine("End of demo, press any key to exit."); - Console.ReadKey(); - } - } - } - //
- - /// - /// Run basic item access methods as a console app demo - /// - /// - // - private static async Task RunItemsDemo() - { - await Program.RunBasicOperationsOnStronglyTypedObjects(); - - await Program.RunBasicOperationsOnDynamicObjects(); - - await Program.UseETags(); - - await Program.UseConsistencyLevels(); - - await Program.AccessSystemDefinedProperties(); - } - // - - /// - /// 1. Basic CRUD operations on a item - /// 1.1 - Create a item - /// 1.2 - Read a item by its Id - /// 1.3 - Read all items in a Collection - /// 1.4 - Query for items by a property other than Id - /// 1.5 - Replace a item - /// 1.6 - Upsert a item - /// 1.7 - Delete a item - /// - // - private static async Task RunBasicOperationsOnStronglyTypedObjects() - { - SalesOrder result = await Program.CreateItemsAsync(); - - await Program.ReadItemAsync(); - - await Program.QueryItems(); - - await Program.ReplaceItemAsync(result); - - await Program.UpsertItemAsync(); - - await Program.DeleteItemAsync(); - } - // - - // - private static async Task CreateItemsAsync() - { - Console.WriteLine("\n1.1 - Creating items"); - - // Create a SalesOrder object. This object has nested properties and various types including numbers, DateTimes and strings. - // This can be saved as JSON as is without converting into rows/columns. - SalesOrder salesOrder = GetSalesOrderSample("SalesOrder1"); - ItemResponse response = await container.CreateItemAsync(salesOrder, new PartitionKey(salesOrder.AccountNumber)); - SalesOrder salesOrder1 = response; - Console.WriteLine($"\n1.1.1 - Item created {salesOrder1.Id}"); - - // As your app evolves, let's say your object has a new schema. You can insert SalesOrderV2 objects without any - // changes to the database tier. - SalesOrder2 newSalesOrder = GetSalesOrderV2Sample("SalesOrder2"); - ItemResponse response2 = await container.CreateItemAsync(newSalesOrder, new PartitionKey(newSalesOrder.AccountNumber)); - SalesOrder2 salesOrder2 = response2; - Console.WriteLine($"\n1.1.2 - Item created {salesOrder2.Id}"); - - // For better performance create a SalesOrder object from a stream. - SalesOrder salesOrderV3 = GetSalesOrderSample("SalesOrderV3"); - using (Stream stream = Program.ToStream(salesOrderV3)) - { - using (ResponseMessage responseMessage = await container.CreateItemStreamAsync(stream, new PartitionKey(salesOrderV3.AccountNumber))) - { - // Item stream operations do not throw exceptions for better performance - if (responseMessage.IsSuccessStatusCode) - { - SalesOrder streamResponse = FromStream(responseMessage.Content); - Console.WriteLine($"\n1.1.2 - Item created {streamResponse.Id}"); - } - else - { - Console.WriteLine($"Create item from stream failed. Status code: {responseMessage.StatusCode} Message: {responseMessage.ErrorMessage}"); - } - } - } - - return salesOrder; - } - // - - // - private static async Task ReadItemAsync() - { - Console.WriteLine("\n1.2 - Reading Item by Id"); - - // Note that Reads require a partition key to be specified. - ItemResponse response = await container.ReadItemAsync( - partitionKey: new PartitionKey("Account1"), - id: "SalesOrder1"); - - // You can measure the throughput consumed by any operation by inspecting the RequestCharge property - Console.WriteLine("Item read by Id {0}", response.Resource); - Console.WriteLine("Request Units Charge for reading a Item by Id {0}", response.RequestCharge); - - SalesOrder readOrder = (SalesOrder)response; - - // Read the same item but as a stream. - using (ResponseMessage responseMessage = await container.ReadItemStreamAsync( - partitionKey: new PartitionKey("Account1"), - id: "SalesOrder1")) - { - // Item stream operations do not throw exceptions for better performance - if (responseMessage.IsSuccessStatusCode) - { - SalesOrder streamResponse = FromStream(responseMessage.Content); - Console.WriteLine($"\n1.2.2 - Item created {streamResponse.Id}"); - } - else - { - Console.WriteLine($"Read item from stream failed. Status code: {responseMessage.StatusCode} Message: {responseMessage.ErrorMessage}"); - } - } - } - // - - // - private static async Task QueryItems() - { - //****************************************************************************************************************** - // 1.4 - Query for items by a property other than Id - // - // NOTE: Operations like AsEnumerable(), ToList(), ToArray() will make as many trips to the database - // as required to fetch the entire result-set. Even if you set MaxItemCount to a smaller number. - // MaxItemCount just controls how many results to fetch each trip. - //****************************************************************************************************************** - Console.WriteLine("\n1.4 - Querying for a item using its AccountNumber property"); - - QueryDefinition query = new QueryDefinition( - "select * from sales s where s.AccountNumber = @AccountInput ") - .WithParameter("@AccountInput", "Account1"); - - FeedIterator resultSet = container.GetItemQueryIterator( - query, - requestOptions: new QueryRequestOptions() - { - PartitionKey = new PartitionKey("Account1"), - MaxItemCount = 1 - }); - - List allSalesForAccount1 = new List(); - while (resultSet.HasMoreResults) - { - SalesOrder sale = (await resultSet.ReadNextAsync()).First(); - Console.WriteLine($"\n1.4.1 Account Number: {sale.AccountNumber}; Id: {sale.Id} "); - allSalesForAccount1.Add(sale); - } - - Console.WriteLine($"\n1.4.2 Query found {allSalesForAccount1.Count} items."); - - // Use the same query as before but get the cosmos response message to access the stream directly - FeedIterator streamResultSet = container.GetItemQueryStreamIterator( - query, - requestOptions: new QueryRequestOptions() - { - PartitionKey = new PartitionKey("Account1"), - MaxItemCount = 10, - MaxConcurrency = 1 - }); - - List allSalesForAccount1FromStream = new List(); - while (streamResultSet.HasMoreResults) - { - using (ResponseMessage responseMessage = await streamResultSet.ReadNextAsync()) - { - // Item stream operations do not throw exceptions for better performance - if (responseMessage.IsSuccessStatusCode) - { - dynamic streamResponse = FromStream(responseMessage.Content); - List salesOrders = streamResponse.Documents.ToObject>(); - Console.WriteLine($"\n1.4.3 - Item Query via stream {salesOrders.Count}"); - allSalesForAccount1FromStream.AddRange(salesOrders); - } - else - { - Console.WriteLine($"Query item from stream failed. Status code: {responseMessage.StatusCode} Message: {responseMessage.ErrorMessage}"); - } - } - } - - Console.WriteLine($"\n1.4.4 Query found {allSalesForAccount1FromStream.Count} items."); - - if (allSalesForAccount1.Count != allSalesForAccount1FromStream.Count) - { - throw new InvalidDataException($"Both query operations should return the same list"); - } - } - // - - // - private static async Task ReplaceItemAsync(SalesOrder order) - { - //****************************************************************************************************************** - // 1.5 - Replace a item - // - // Just update a property on an existing item and issue a Replace command - //****************************************************************************************************************** - Console.WriteLine("\n1.5 - Replacing a item using its Id"); - - order.ShippedDate = DateTime.UtcNow; - ItemResponse response = await container.ReplaceItemAsync( - partitionKey: new PartitionKey(order.AccountNumber), - id: order.Id, - item: order); - - SalesOrder updated = response.Resource; - Console.WriteLine($"Request charge of replace operation: {response.RequestCharge}"); - Console.WriteLine($"Shipped date of updated item: {updated.ShippedDate}"); - - order.ShippedDate = DateTime.UtcNow; - using (Stream stream = Program.ToStream(order)) - { - using (ResponseMessage responseMessage = await container.ReplaceItemStreamAsync( - partitionKey: new PartitionKey(order.AccountNumber), - id: order.Id, - streamPayload: stream)) - { - // Item stream operations do not throw exceptions for better performance - if (responseMessage.IsSuccessStatusCode) - { - SalesOrder streamResponse = FromStream(responseMessage.Content); - Console.WriteLine($"\n1.5.2 - Item replace via stream {streamResponse.Id}"); - } - else - { - Console.WriteLine($"Replace item from stream failed. Status code: {responseMessage.StatusCode} Message: {responseMessage.ErrorMessage}"); - } - } - } - } - // - - // - private static async Task UpsertItemAsync() - { - Console.WriteLine("\n1.6 - Upserting a item"); - - SalesOrder upsertOrder = GetSalesOrderSample("SalesOrder3"); - ItemResponse response = await container.UpsertItemAsync( - partitionKey: new PartitionKey(upsertOrder.AccountNumber), - item: upsertOrder); - - SalesOrder upserted = response.Resource; - Console.WriteLine($"Request charge of upsert operation: {response.RequestCharge}"); - Console.WriteLine($"StatusCode of this operation: { response.StatusCode}"); - Console.WriteLine($"Id of upserted item: {upserted.Id}"); - Console.WriteLine($"AccountNumber of upserted item: {upserted.AccountNumber}"); - - upserted.AccountNumber = "updated account number"; - response = await container.UpsertItemAsync(partitionKey: new PartitionKey(upserted.AccountNumber), item: upserted); - upserted = response.Resource; - - Console.WriteLine($"Request charge of upsert operation: {response.RequestCharge}"); - Console.WriteLine($"StatusCode of this operation: { response.StatusCode}"); - Console.WriteLine($"Id of upserted item: {upserted.Id}"); - Console.WriteLine($"AccountNumber of upserted item: {upserted.AccountNumber}"); - - // For better performance upsert a SalesOrder object from a stream. - SalesOrder salesOrderV4 = GetSalesOrderSample("SalesOrder4"); - using (Stream stream = Program.ToStream(salesOrderV4)) - { - using (ResponseMessage responseMessage = await container.UpsertItemStreamAsync( - partitionKey: new PartitionKey(salesOrderV4.AccountNumber), - streamPayload: stream)) - { - // Item stream operations do not throw exceptions for better performance - if (responseMessage.IsSuccessStatusCode) - { - SalesOrder streamResponse = FromStream(responseMessage.Content); - Console.WriteLine($"\n1.6.2 - Item upserted via stream {streamResponse.Id}"); - } - else - { - Console.WriteLine($"Upsert item from stream failed. Status code: {responseMessage.StatusCode} Message: {responseMessage.ErrorMessage}"); - } - } - } - } - // - - // - private static async Task DeleteItemAsync() - { - Console.WriteLine("\n1.7 - Deleting a item"); - ItemResponse response = await container.DeleteItemAsync( - partitionKey: new PartitionKey("Account1"), - id: "SalesOrder3"); - - Console.WriteLine("Request charge of delete operation: {0}", response.RequestCharge); - Console.WriteLine("StatusCode of operation: {0}", response.StatusCode); - } - // - - private static T FromStream(Stream stream) - { - using (stream) - { - if (typeof(Stream).IsAssignableFrom(typeof(T))) - { - return (T)(object)(stream); - } - - using (StreamReader sr = new StreamReader(stream)) - { - using (JsonTextReader jsonTextReader = new JsonTextReader(sr)) - { - return Program.Serializer.Deserialize(jsonTextReader); - } - } - } - } - - private static Stream ToStream(T input) - { - MemoryStream streamPayload = new MemoryStream(); - using (StreamWriter streamWriter = new StreamWriter(streamPayload, encoding: Encoding.Default, bufferSize: 1024, leaveOpen: true)) - { - using (JsonWriter writer = new JsonTextWriter(streamWriter)) - { - writer.Formatting = Newtonsoft.Json.Formatting.None; - Program.Serializer.Serialize(writer, input); - writer.Flush(); - streamWriter.Flush(); - } - } - - streamPayload.Position = 0; - return streamPayload; - } - - private static SalesOrder GetSalesOrderSample(string itemId) - { - SalesOrder salesOrder = new SalesOrder - { - Id = itemId, - AccountNumber = "Account1", - PurchaseOrderNumber = "PO18009186470", - OrderDate = new DateTime(2005, 7, 1), - SubTotal = 419.4589m, - TaxAmount = 12.5838m, - Freight = 472.3108m, - TotalDue = 985.018m, - Items = new SalesOrderDetail[] - { - new SalesOrderDetail - { - OrderQty = 1, - ProductId = 760, - UnitPrice = 419.4589m, - LineTotal = 419.4589m - } - }, - }; - - // Set the "ttl" property to auto-expire sales orders in 30 days - salesOrder.TimeToLive = 60 * 60 * 24 * 30; - - return salesOrder; - } - - private static SalesOrder2 GetSalesOrderV2Sample(string itemId) - { - return new SalesOrder2 - { - Id = itemId, - AccountNumber = "Account2", - PurchaseOrderNumber = "PO15428132599", - OrderDate = new DateTime(2005, 7, 1), - DueDate = new DateTime(2005, 7, 13), - ShippedDate = new DateTime(2005, 7, 8), - SubTotal = 6107.0820m, - TaxAmt = 586.1203m, - Freight = 183.1626m, - DiscountAmt = 1982.872m, // new property added to SalesOrder2 - TotalDue = 4893.3929m, - Items = new SalesOrderDetail2[] - { - new SalesOrderDetail2 - { - OrderQty = 3, - ProductCode = "A-123", // notice how in SalesOrderDetail2 we no longer reference a ProductId - ProductName = "Product 1", // instead we have decided to denormalize our schema and include - CurrencySymbol = "$", // the Product details relevant to the Order on to the Order directly - CurrencyCode = "USD", // this is a typical refactor that happens in the course of an application - UnitPrice = 17.1m, // that would have previously required schema changes and data migrations etc. - LineTotal = 5.7m - } - } - }; - } - - /// - /// 2. Basic CRUD operations using dynamics instead of strongly typed objects - /// Cosmos does not require objects to be typed. Applications that merge data from different data sources, or - /// need to handle evolving schemas can write data directly as JSON or dynamic objects. - /// - // - private static async Task RunBasicOperationsOnDynamicObjects() - { - Console.WriteLine("\n2. Use Dynamics"); - - // Create a dynamic object - dynamic salesOrder = new - { - id = "_SalesOrder5", - AccountNumber = "NewUser01", - PurchaseOrderNumber = "PO18009186470", - OrderDate = DateTime.UtcNow, - Total = 5.95, - }; - - Console.WriteLine("\nCreating item"); - - ItemResponse response = await container.CreateItemAsync(salesOrder, new PartitionKey("NewUser01")); - dynamic createdItem = response.Resource; - - Console.WriteLine("Item with id {0} created", createdItem.Id); - Console.WriteLine("Request charge of operation: {0}", response.RequestCharge); - - response = await container.ReadItemAsync(partitionKey: new PartitionKey("NewUser01"), id: "_SalesOrder5"); - - dynamic readItem = response.Resource; - - //update a dynamic object by just creating a new Property on the fly - //Item is itself a dynamic object, so you can just use this directly too if you prefer - readItem.Add("shippedDate", DateTime.UtcNow); - - //if you wish to work with a dynamic object so you don't need to use SetPropertyValue() or GetPropertyValue() - //then you can cast to a dynamic - salesOrder = readItem; - salesOrder.foo = "bar"; - - //now do a replace using this dynamic item - //everything that is needed is contained in the readDynOrder object - //it has a .self Property - Console.WriteLine("\nReplacing item"); - - response = await container.ReplaceItemAsync(partitionKey: new PartitionKey("NewUser01"), id: "_SalesOrder5", item: salesOrder); - dynamic replaced = response.Resource; - - Console.WriteLine("Request charge of operation: {0}", response.RequestCharge); - Console.WriteLine("shippedDate: {0} and foo: {1} of replaced item", replaced.shippedDate, replaced.foo); - } - // - - /// - /// 3. Using ETags to control execution of operations - /// 3.1 - Use ETag to control if a ReplaceItem operation should check if ETag of request matches Item - /// 3.2 - Use ETag to control if ReadItem should only return a result if the ETag of the request does not match the Item - /// - /// - // - private static async Task UseETags() - { - //****************************************************************************************************************** - // 3.1 - Use ETag to control if a replace should succeed, or not, based on whether the ETag on the request matches - // the current ETag value of the persisted Item - // - // All items in Cosmos have an _etag field. This gets set on the server every time a item is updated. - // - // When doing a replace of a item you can opt-in to having the server only apply the Replace if the ETag - // on the request matches the ETag of the item on the server. - // If someone did an update to the same item since you read it, then the ETag on the server will not match - // and the Replace operation can be rejected. - //****************************************************************************************************************** - Console.WriteLine("\n3.1 - Using optimistic concurrency when doing a ReplaceItemAsync"); - - //read a item - ItemResponse itemResponse = await container.ReadItemAsync( - partitionKey: new PartitionKey("Account1"), - id: "SalesOrder1"); - - Console.WriteLine("ETag of read item - {0}", itemResponse.ETag); - - SalesOrder item = itemResponse; - //Update the total due - itemResponse.Resource.TotalDue = 1000000; - - //persist the change back to the server - ItemResponse updatedDoc = await container.ReplaceItemAsync( - partitionKey: new PartitionKey(item.AccountNumber), - id: item.Id, - item: item); - - Console.WriteLine("ETag of item now that is has been updated - {0}", updatedDoc.ETag); - - //now, using the originally retrieved item do another update - //but set the AccessCondition class with the ETag of the originally read item and also set the AccessConditionType - //this tells the service to only do this operation if ETag on the request matches the current ETag on the item - //in our case it won't, because we updated the item and therefore gave it a new ETag - try - { - itemResponse.Resource.TotalDue = 9999999; - updatedDoc = await container.ReplaceItemAsync(itemResponse, item.Id, new PartitionKey(item.AccountNumber), new ItemRequestOptions { IfMatchEtag = itemResponse.ETag }); - } - catch (CosmosException cre) - { - // now notice the failure when attempting the update - // this is because the ETag on the server no longer matches the ETag of doc (b/c it was changed in step 2) - if (cre.StatusCode == HttpStatusCode.PreconditionFailed) - { - Console.WriteLine("As expected, we have a pre-condition failure exception\n"); - } - } - - //******************************************************************************************************************* - // 3.2 - ETag on a ReadItemAsync request can be used to tell the server whether it should return a result, or not - // - // By setting the ETag on a ReadItemRequest along with an AccessCondition of IfNoneMatch instructs the server - // to only return a result if the ETag of the request does not match that of the persisted Item - //******************************************************************************************************************* - - Console.WriteLine("\n3.2 - Using ETag to do a conditional ReadItemAsync"); - - // Get a item - ItemResponse response = await container.ReadItemAsync(partitionKey: new PartitionKey("Account2"), id: "SalesOrder2"); - - item = response; - Console.WriteLine($"Read doc with StatusCode of {response.StatusCode}"); - - // Get the item again with conditional access set, no item should be returned - response = await container.ReadItemAsync( - partitionKey: new PartitionKey("Account2"), - id: "SalesOrder2", - requestOptions: new ItemRequestOptions() { IfNoneMatchEtag = itemResponse.ETag }); - - Console.WriteLine("Read doc with StatusCode of {0}", response.StatusCode); - - // Now change something on the item, then do another get and this time we should get the item back - response.Resource.TotalDue = 42; - - response = await container.ReplaceItemAsync(item, item.Id, new PartitionKey(item.AccountNumber)); - - response = await container.ReadItemAsync( - partitionKey: new PartitionKey("Account2"), - id: "SalesOrder2", - requestOptions: new ItemRequestOptions() { IfNoneMatchEtag = itemResponse.ETag }); - - - Console.WriteLine("Read doc with StatusCode of {0}", response.StatusCode); - } - // - - /// - /// 4. Access items system defined properties - /// - /// - // - private static async Task AccessSystemDefinedProperties() - { - //****************************************************************************************************************** - // Items contain attributes that are system defined: - // Timestamp : Gets the last modified timestamp associated with the item from the Azure Cosmos DB service. - // Etag : Gets the entity tag associated with the item from the Azure Cosmos DB service. - // TimeToLive : Gets the time to live in seconds of the item in the Azure Cosmos DB service. - // - // See also: https://docs.microsoft.com/azure/cosmos-db/databases-containers-items#azure-cosmos-containers - //****************************************************************************************************************** - Console.WriteLine("\n4 - Accessing system defined properties"); - - //read a item's metadata - - Metadata itemResponse = await container.ReadItemAsync( - partitionKey: new PartitionKey("Account1"), - id: "SalesOrder1"); - - Console.WriteLine("ETag of read item - {0}", itemResponse.Etag); - - Console.WriteLine("TimeToLive of read item - {0}", itemResponse.TimeToLive); - - Console.WriteLine("Timestamp of read item - {0}", itemResponse.Timestamp.ToShortDateString()); - } - // - - // - private static async Task UseConsistencyLevels() - - { - // Override the consistency level for a read request - ItemResponse response = await container.ReadItemAsync( - partitionKey: new PartitionKey("Account2"), - id: "SalesOrder2", - requestOptions: new ItemRequestOptions() { ConsistencyLevel = ConsistencyLevel.Eventual }); - } - // - - private static async Task Cleanup() - { - if (database != null) - { - await database.DeleteAsync(); - } - } - - private static async Task Initialize(CosmosClient client) - { - database = await client.CreateDatabaseIfNotExistsAsync(databaseId); - - // Delete the existing container to prevent create item conflicts - using (await database.GetContainer(containerId).DeleteContainerStreamAsync()) - { } - - // We create a partitioned collection here which needs a partition key. Partitioned collections - // can be created with very high values of provisioned throughput (up to Throughput = 250,000) - // and used to store up to 250 GB of data. You can also skip specifying a partition key to create - // single partition collections that store up to 10 GB of data. - // For this demo, we create a collection to store SalesOrders. We set the partition key to the account - // number so that we can retrieve all sales orders for an account efficiently from a single partition, - // and perform transactions across multiple sales order for a single account number. - ContainerProperties containerProperties = new ContainerProperties(containerId, partitionKeyPath: "/AccountNumber"); - - // Create with a throughput of 1000 RU/s - container = await database.CreateContainerIfNotExistsAsync( - containerProperties, - throughput: 1000); - } - } -} - diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/NonPartitionContainerMigration/NonPartitionContainerMigration.csproj b/Microsoft.Azure.Cosmos.Samples/CodeSamples/NonPartitionContainerMigration/NonPartitionContainerMigration.csproj deleted file mode 100644 index 1efa0299b..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/NonPartitionContainerMigration/NonPartitionContainerMigration.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - Exe - netcoreapp2.1 - latest - - - - - - - - - - - - - - PreserveNewest - - - diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/NonPartitionContainerMigration/Program.cs b/Microsoft.Azure.Cosmos.Samples/CodeSamples/NonPartitionContainerMigration/Program.cs deleted file mode 100644 index 57276a9b8..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/NonPartitionContainerMigration/Program.cs +++ /dev/null @@ -1,337 +0,0 @@ -namespace Cosmos.Samples.Shared -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Text; - using System.Threading.Tasks; - using Microsoft.Azure.Cosmos; - using Microsoft.Extensions.Configuration; - using Newtonsoft.Json; - - /// - /// ---------------------------------------------------------------------------------------------------------- - /// Prerequisites - - /// - /// 1. An Azure Cosmos account - - /// https://azure.microsoft.com/en-us/itemation/articles/itemdb-create-account/ - /// - /// 2. Microsoft.Azure.Cosmos NuGet package - - /// http://www.nuget.org/packages/Microsoft.Azure.Cosmos/ - /// ---------------------------------------------------------------------------------------------------------- - /// Sample - Demonstrates the basic CRUD operations on Container that is migrated from Non-Partitioned mode to - /// Partitioned mode. - /// - /// These include the following operations: - /// 1. Document CRUD operations in the same logical partition as pre-migration - /// 2. Document CRUD operations with a partition key value on the migrated container - /// 3. Migration of documents inserted without partition key into a logical parition with a valid partition key value - /// - /// - /// Note: This sample is written for V3 SDK and since V3 SDK doesn't allow creating a container without partition key, - /// this sample uses REST API to perform such operation. - /// ---------------------------------------------------------------------------------------------------------- - /// - - public class Program - { - private static readonly string PreNonPartitionedMigrationApiVersion = "2018-09-17"; - private static readonly string utc_date = DateTime.UtcNow.ToString("r"); - private static readonly JsonSerializer Serializer = new JsonSerializer(); - - private static string databaseId = null; - private static string containerId = null; - - public class DeviceInformationItem - { - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - - [JsonProperty(PropertyName = "deviceId")] - public string DeviceId { get; set; } - - [JsonProperty(PropertyName = "_partitionKey", NullValueHandling = NullValueHandling.Ignore)] - public string PartitionKey { get; set; } - } - - //
- public static async Task Main(string[] args) - { - try - { - databaseId = "deviceInformation" + Guid.NewGuid().ToString(); - containerId = "device-samples" + Guid.NewGuid().ToString(); - - IConfigurationRoot configuration = new ConfigurationBuilder() - .AddJsonFile("appSettings.json") - .Build(); - - string endpoint = configuration["EndPointUrl"]; - if (string.IsNullOrEmpty(endpoint)) - { - throw new ArgumentNullException("Please specify a valid endpoint in the appSettings.json"); - } - - string authKey = configuration["AuthorizationKey"]; - if (string.IsNullOrEmpty(authKey) || string.Equals(authKey, "Super secret key")) - { - throw new ArgumentException("Please specify a valid AuthorizationKey in the appSettings.json"); - } - - using (CosmosClient client = new CosmosClient(endpoint, authKey)) - { - Database database = await client.CreateDatabaseIfNotExistsAsync(databaseId); - - // Create the container using REST API without a partition key definition - await Program.CreateNonPartitionedContainerAsync(endpoint, authKey); - - Container container = database.GetContainer(containerId); - - // Read back the same container and verify that partition key path is populated - // Partition key is returned when read from V3 SDK. - ContainerResponse containerResposne = await container.ReadContainerAsync(); - if (containerResposne.Resource.PartitionKeyPath != null) - { - Console.WriteLine("Container Partition Key path {0}", containerResposne.Resource.PartitionKeyPath); - } - else - { - throw new Exception("Unexpected error : Partition Key is not populated in a migrated collection"); - } - - Console.WriteLine("--Demo Item operations with no partition key--"); - await Program.ItemOperationsWithNonePartitionKeyValue(container); - - Console.WriteLine("--Demo Item operations with valid partition key--"); - await Program.ItemOperationsWithValidPartitionKeyValue(container); - - Console.WriteLine("--Demo migration of items inserted with no partition key to items with a partition key--"); - await Program.MigratedItemsFromNonePartitionKeyToValidPartitionKeyValue(container); - - // Clean up the database -- for rerunning the sample - await database.DeleteAsync(); - } - } - catch (CosmosException cre) - { - Console.WriteLine(cre.ToString()); - } - catch (Exception e) - { - Exception baseException = e.GetBaseException(); - Console.WriteLine("Error: {0}, Message: {1}", e.Message, baseException.Message); - } - finally - { - Console.WriteLine("End of demo, press any key to exit."); - Console.ReadKey(); - } - } - //
- - /// - /// The function demonstrates the Item CRUD operation using the NonePartitionKeyValue - /// NonePartitionKeyValue represents the information that the current item doesn't have a value for partitition key - /// All items inserted pre-migration are grouped into this logical partition and can be accessed by providing this value - /// for the partitionKey parameter - /// New item CRUD could be performed using this NonePartitionKeyValue to target the same logical partition - /// - // - private static async Task ItemOperationsWithNonePartitionKeyValue(Container container) - { - string itemid = Guid.NewGuid().ToString(); - DeviceInformationItem itemWithoutPK = GetDeviceWithNoPartitionKey(itemid); - - // Insert a new item with NonePartitionKeyValue - ItemResponse createResponse = await container.CreateItemAsync( - item: itemWithoutPK, - partitionKey: PartitionKey.None); - Console.WriteLine("Creating Item {0} Status Code {1}", itemid, createResponse.StatusCode); - - // Read an existing item with NonePartitionKeyValue - ItemResponse readResponse = await container.ReadItemAsync( - id: itemid, - partitionKey: PartitionKey.None - ); - Console.WriteLine("Reading Item {0} Status Code {1}", itemid, readResponse.StatusCode); - - // Replace the content of existing item with NonePartitionKeyValue - itemWithoutPK.DeviceId = Guid.NewGuid().ToString(); - ItemResponse replaceResponse = await container.ReplaceItemAsync( - item: itemWithoutPK, - id: itemWithoutPK.Id, - partitionKey: PartitionKey.None - ); - Console.WriteLine("Replacing Item {0} Status Code {1}", itemid, replaceResponse.StatusCode); - - // Delete an item with NonePartitionKeyValue. - ItemResponse deleteResponse = await container.DeleteItemAsync( - id: itemid, - partitionKey: PartitionKey.None - ); - Console.WriteLine("Deleting Item {0} Status Code {1}", itemid, deleteResponse.StatusCode); - } - // - - /// - /// The function demonstrates CRUD operations on the migrated collection supplying a value for the partition key - /// - // - private static async Task ItemOperationsWithValidPartitionKeyValue(Container container) - { - string itemid = Guid.NewGuid().ToString(); - string partitionKey = "a"; - DeviceInformationItem itemWithPK = GetDeviceWithPartitionKey(itemid, partitionKey); - - // Insert a new item - ItemResponse createResponse = await container.CreateItemAsync( - partitionKey: new PartitionKey(partitionKey), - item: itemWithPK); - Console.WriteLine("Creating Item {0} with Partition Key Status Code {1}", itemid, createResponse.StatusCode); - - // Read the item back - ItemResponse readResponse = await container.ReadItemAsync( - partitionKey: new PartitionKey(partitionKey), - id: itemid); - Console.WriteLine("Reading Item {0} with Partition Key Status Code {1}", itemid, readResponse.StatusCode); - - // Replace the content of the item - itemWithPK.DeviceId = Guid.NewGuid().ToString(); - ItemResponse replaceResponse = await container.ReplaceItemAsync( - partitionKey: new PartitionKey(partitionKey), - id: itemWithPK.Id, - item: itemWithPK); - Console.WriteLine("Replacing Item {0} with Partition Key Status Code {1}", itemid, replaceResponse.StatusCode); - - // Delete the item. - ItemResponse deleteResponse = await container.DeleteItemAsync( - partitionKey: new PartitionKey(partitionKey), - id: itemid); - Console.WriteLine("Deleting Item {0} with Partition Key Status Code {1}", itemid, deleteResponse.StatusCode); - } - // - - /// - /// The function demonstrates migrating documents that were inserted without a value for partition key, and those inserted - /// pre-migration to other logical partitions, those with a value for partition key. - /// - // - private static async Task MigratedItemsFromNonePartitionKeyToValidPartitionKeyValue(Container container) - { - // Pre-create a few items in the container to demo the migration - const int ItemsToCreate = 4; - // Insert a few items with no Partition Key - for (int i = 0; i < ItemsToCreate; i++) - { - string itemid = Guid.NewGuid().ToString(); - DeviceInformationItem itemWithoutPK = GetDeviceWithNoPartitionKey(itemid); - ItemResponse createResponse = await container.CreateItemAsync( - partitionKey: PartitionKey.None, - item: itemWithoutPK); - } - - // Query items on the container that have no partition key value by supplying NonePartitionKeyValue - // The operation is made in batches to not lose work in case of partial execution - int resultsFetched = 0; - QueryDefinition sql = new QueryDefinition("select * from r"); - FeedIterator setIterator = container.GetItemQueryIterator(sql, requestOptions: new QueryRequestOptions() { PartitionKey = PartitionKey.None, MaxItemCount = 2 }); - while (setIterator.HasMoreResults) - { - FeedResponse queryResponse = await setIterator.ReadNextAsync(); - resultsFetched += queryResponse.Count(); - - // For the items returned with NonePartitionKeyValue - IEnumerator iter = queryResponse.GetEnumerator(); - while (iter.MoveNext()) - { - DeviceInformationItem item = iter.Current; - if (item.DeviceId != null) - { - // Using existing deviceID for partition key - item.PartitionKey = item.DeviceId; - Console.WriteLine("Migrating item {0} to Partition {1}", item.Id, item.DeviceId); - // Re-Insert into container with a partition key - // This could result in exception if the same item was inserted in a previous run of the program on existing container - // and the program stopped before the delete. - ItemResponse createResponseWithPk = await container.CreateItemAsync( - partitionKey: new PartitionKey(item.PartitionKey), - item: item); - - // Deleting item from fixed container with CosmosContainerSettings.NonePartitionKeyValue. - ItemResponse deleteResponseWithoutPk = await container.DeleteItemAsync( - partitionKey: PartitionKey.None, - id: item.Id); - } - } - } - } - // - - private static DeviceInformationItem GetDeviceWithPartitionKey(string itemId, string partitionKey) - { - return new DeviceInformationItem - { - Id = itemId, - DeviceId = Guid.NewGuid().ToString(), - PartitionKey = partitionKey - }; - } - - private static DeviceInformationItem GetDeviceWithNoPartitionKey(string itemId) - { - return new DeviceInformationItem - { - Id = itemId, - DeviceId = Guid.NewGuid().ToString(), - }; - } - - private static async Task CreateNonPartitionedContainerAsync(string endpoint, string authKey) - { - // Creating non partition Container, REST api used instead of .NET SDK as creation without a partition key is not supported anymore. - Console.WriteLine("Creating container without a partition key"); - HttpClient client = new System.Net.Http.HttpClient(); - Uri baseUri = new Uri(endpoint); - string verb = "POST"; - string resourceType = "colls"; - string resourceId = string.Format("dbs/{0}", Program.databaseId); - string resourceLink = string.Format("dbs/{0}/colls", Program.databaseId); - client.DefaultRequestHeaders.Add("x-ms-date", Program.utc_date); - client.DefaultRequestHeaders.Add("x-ms-version", Program.PreNonPartitionedMigrationApiVersion); - - string authHeader = GenerateMasterKeyAuthorizationSignature(verb, resourceId, resourceType, authKey, "master", "1.0"); - - client.DefaultRequestHeaders.Add("authorization", authHeader); - string containerDefinition = "{\n \"id\": \"" + Program.containerId + "\"\n}"; - StringContent containerContent = new StringContent(containerDefinition); - Uri requestUri = new Uri(baseUri, resourceLink); - var response = await client.PostAsync(requestUri.ToString(), containerContent); - Console.WriteLine("Create container response {0}", response.StatusCode); - } - - private static string GenerateMasterKeyAuthorizationSignature(string verb, string resourceId, string resourceType, string key, string keyType, string tokenVersion) - { - System.Security.Cryptography.HMACSHA256 hmacSha256 = new System.Security.Cryptography.HMACSHA256 { Key = Convert.FromBase64String(key) }; - - string payLoad = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}\n{1}\n{2}\n{3}\n{4}\n", - verb.ToLowerInvariant(), - resourceType.ToLowerInvariant(), - resourceId, - utc_date.ToLowerInvariant(), - "" - ); - - byte[] hashPayLoad = hmacSha256.ComputeHash(System.Text.Encoding.UTF8.GetBytes(payLoad)); - string signature = Convert.ToBase64String(hashPayLoad); - - return System.Web.HttpUtility.UrlEncode(string.Format(System.Globalization.CultureInfo.InvariantCulture, "type={0}&ver={1}&sig={2}", - keyType, - tokenVersion, - signature)); - } - } -} - diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/NuGet.config b/Microsoft.Azure.Cosmos.Samples/CodeSamples/NuGet.config deleted file mode 100644 index cbb81b261..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/NuGet.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Queries/Program.cs b/Microsoft.Azure.Cosmos.Samples/CodeSamples/Queries/Program.cs deleted file mode 100644 index 08759de7f..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Queries/Program.cs +++ /dev/null @@ -1,424 +0,0 @@ -namespace Cosmos.Samples.Shared -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Threading.Tasks; - using Microsoft.Azure.Cosmos; - using Microsoft.Extensions.Configuration; - using Newtonsoft.Json; - - /// - /// This class shows the different ways to execute item feed and queries. - /// - /// - /// For help with SQL query syntax see: - /// https://docs.microsoft.com/en-us/azure/cosmos-db/query-cheat-sheet - /// https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-sql-query - /// - internal class Program - { - //Read configuration - private static readonly string CosmosDatabaseId = "samples"; - private static readonly string containerId = "query-samples"; - - private static Database cosmosDatabase = null; - - // Async main requires c# 7.1 which is set in the csproj with the LangVersion attribute - //
- public static async Task Main(string[] args) - { - try - { - IConfigurationRoot configuration = new ConfigurationBuilder() - .AddJsonFile("appSettings.json") - .Build(); - - string endpoint = configuration["EndPointUrl"]; - if (string.IsNullOrEmpty(endpoint)) - { - throw new ArgumentNullException("Please specify a valid endpoint in the appSettings.json"); - } - - string authKey = configuration["AuthorizationKey"]; - if (string.IsNullOrEmpty(authKey) || string.Equals(authKey, "Super secret key")) - { - throw new ArgumentException("Please specify a valid AuthorizationKey in the appSettings.json"); - } - - //Read the Cosmos endpointUrl and authorizationKey from configuration - //These values are available from the Azure Management Portal on the Cosmos Account Blade under "Keys" - //NB > Keep these values in a safe & secure location. Together they provide Administrative access to your Cosmos account - using (CosmosClient client = new CosmosClient(endpoint, authKey)) - { - await Program.RunDemoAsync(client); - } - } - catch (CosmosException cre) - { - Console.WriteLine(cre.ToString()); - } - catch (Exception e) - { - Exception baseException = e.GetBaseException(); - Console.WriteLine("Error: {0}, Message: {1}", e.Message, baseException.Message); - } - finally - { - Console.WriteLine("End of demo, press any key to exit."); - Console.ReadKey(); - } - } - //
- - // - private static async Task RunDemoAsync(CosmosClient client) - { - cosmosDatabase = await client.CreateDatabaseIfNotExistsAsync(CosmosDatabaseId); - Container container = await Program.GetOrCreateContainerAsync(cosmosDatabase, containerId); - - await Program.CreateItems(container); - - await Program.ItemFeed(container); - - await Program.ItemStreamFeed(container); - - await Program.QueryItemsInPartitionAsStreams(container); - - await Program.QueryPartitionedContainerInParallelAsync(container); - - await Program.QueryWithSqlParameters(container); - - // Uncomment to Cleanup - //await cosmosDatabase.DeleteAsync(); - } - // - - // - private static async Task ItemFeed(Container container) - { - List families = new List(); - - // SQL - FeedIterator setIterator = container.GetItemQueryIterator(requestOptions: new QueryRequestOptions { MaxItemCount = 1}); - while (setIterator.HasMoreResults) - { - int count = 0; - foreach (Family item in await setIterator.ReadNextAsync()) - { - count++; - Assert("Should only return 1 result at a time.", count <= 1); - families.Add(item); - } - } - - Assert("Expected two families", families.ToList().Count == 2); - } - // - - // - private static async Task ItemStreamFeed(Container container) - { - int totalCount = 0; - - // SQL - FeedIterator setIterator = container.GetItemQueryStreamIterator(); - while (setIterator.HasMoreResults) - { - int count = 0; - using (ResponseMessage response = await setIterator.ReadNextAsync()) - { - response.EnsureSuccessStatusCode(); - count++; - using (StreamReader sr = new StreamReader(response.Content)) - using (JsonTextReader jtr = new JsonTextReader(sr)) - { - JsonSerializer jsonSerializer = new JsonSerializer(); - dynamic array = jsonSerializer.Deserialize(jtr); - totalCount += array.Documents.Count; - } - } - - } - - Assert("Expected two families", totalCount == 2); - } - // - - // - private static async Task QueryItemsInPartitionAsStreams(Container container) - { - // SQL - FeedIterator setIterator = container.GetItemQueryStreamIterator( - "SELECT F.id, F.LastName, F.IsRegistered FROM Families F", - requestOptions: new QueryRequestOptions() { - PartitionKey = new PartitionKey("Anderson"), - MaxConcurrency = 1, - MaxItemCount = 1 - }); - - int count = 0; - while (setIterator.HasMoreResults) - { - using (ResponseMessage response = await setIterator.ReadNextAsync()) - { - Assert("Response failed", response.IsSuccessStatusCode); - count++; - using (StreamReader sr = new StreamReader(response.Content)) - using (JsonTextReader jtr = new JsonTextReader(sr)) - { - JsonSerializer jsonSerializer = new JsonSerializer(); - dynamic items = jsonSerializer.Deserialize(jtr).Documents; - Assert("Expected one family", items.Count == 1); - dynamic item = items[0]; - Assert($"Expected LastName: Anderson Actual: {item.LastName}", string.Equals("Anderson", item.LastName.ToString(), StringComparison.InvariantCulture)); - } - } - } - - Assert("Expected 1 family", count == 1); - } - // - - // - private static async Task QueryWithSqlParameters(Container container) - { - // Query using two properties within each item. WHERE Id == "" AND Address.City == "" - // notice here how we are doing an equality comparison on the string value of City - - QueryDefinition query = new QueryDefinition("SELECT * FROM Families f WHERE f.id = @id AND f.Address.City = @city") - .WithParameter("@id", "AndersonFamily") - .WithParameter("@city", "Seattle"); - - List results = new List(); - FeedIterator resultSetIterator = container.GetItemQueryIterator(query, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey("Anderson")}); - while (resultSetIterator.HasMoreResults) - { - results.AddRange((await resultSetIterator.ReadNextAsync())); - } - - Assert("Expected only 1 family", results.Count == 1); - } - // - - // - private static async Task QueryPartitionedContainerInParallelAsync(Container container) - { - List familiesSerial = new List(); - string queryText = "SELECT * FROM Families"; - - // 0 maximum parallel tasks, effectively serial execution - QueryRequestOptions options = new QueryRequestOptions() { MaxBufferedItemCount = 100 }; - options.MaxConcurrency = 0; - FeedIterator query = container.GetItemQueryIterator( - queryText, - requestOptions: options); - while (query.HasMoreResults) - { - foreach (Family family in await query.ReadNextAsync()) - { - familiesSerial.Add(family); - } - } - - Assert("Parallel Query expected two families", familiesSerial.ToList().Count == 2); - - // 1 maximum parallel tasks, 1 dedicated asynchronous task to continuously make REST calls - List familiesParallel1 = new List(); - - options.MaxConcurrency = 1; - query = container.GetItemQueryIterator( - queryText, - requestOptions: options); - - while (query.HasMoreResults) - { - foreach (Family family in await query.ReadNextAsync()) - { - familiesParallel1.Add(family); - } - } - - Assert("Parallel Query expected two families", familiesParallel1.ToList().Count == 2); - AssertSequenceEqual("Parallel query returns result out of order compared to serial execution", familiesSerial, familiesParallel1); - - - // 10 maximum parallel tasks, a maximum of 10 dedicated asynchronous tasks to continuously make REST calls - List familiesParallel10 = new List(); - - options.MaxConcurrency = 10; - query = container.GetItemQueryIterator( - queryText, - requestOptions: options); - - while (query.HasMoreResults) - { - foreach (Family family in await query.ReadNextAsync()) - { - familiesParallel10.Add(family); - } - } - - Assert("Parallel Query expected two families", familiesParallel10.ToList().Count == 2); - AssertSequenceEqual("Parallel query returns result out of order compared to serial execution", familiesSerial, familiesParallel10); - } - // - - /// - /// Creates the items used in this Sample - /// - /// The selfLink property for the CosmosContainer where items will be created. - /// None - // - private static async Task CreateItems(Container container) - { - Family AndersonFamily = new Family - { - Id = "AndersonFamily", - LastName = "Anderson", - Parents = new Parent[] - { - new Parent { FirstName = "Thomas" }, - new Parent { FirstName = "Mary Kay"} - }, - Children = new Child[] - { - new Child - { - FirstName = "Henriette Thaulow", - Gender = "female", - Grade = 5, - Pets = new [] - { - new Pet { GivenName = "Fluffy" } - } - } - }, - Address = new Address { State = "WA", County = "King", City = "Seattle" }, - IsRegistered = true, - RegistrationDate = DateTime.UtcNow.AddDays(-1) - }; - - await container.UpsertItemAsync(AndersonFamily, new PartitionKey(AndersonFamily.PartitionKey)); - - Family WakefieldFamily = new Family - { - Id = "WakefieldFamily", - LastName = "Wakefield", - Parents = new[] { - new Parent { FamilyName= "Wakefield", FirstName= "Robin" }, - new Parent { FamilyName= "Miller", FirstName= "Ben" } - }, - Children = new Child[] { - new Child - { - FamilyName= "Merriam", - FirstName= "Jesse", - Gender= "female", - Grade= 8, - Pets= new Pet[] { - new Pet { GivenName= "Goofy" }, - new Pet { GivenName= "Shadow" } - } - }, - new Child - { - FirstName= "Lisa", - Gender= "female", - Grade= 1 - } - }, - Address = new Address { State = "NY", County = "Manhattan", City = "NY" }, - IsRegistered = false, - RegistrationDate = DateTime.UtcNow.AddDays(-30) - }; - - await container.UpsertItemAsync(WakefieldFamily, new PartitionKey(WakefieldFamily.PartitionKey)); - } - // - - /// - /// Get a DocuemntContainer by id, or create a new one if one with the id provided doesn't exist. - /// - /// The id of the CosmosContainer to search for, or create. - /// The matched, or created, CosmosContainer object - // - private static async Task GetOrCreateContainerAsync(Database database, string containerId) - { - ContainerProperties containerProperties = new ContainerProperties(id: containerId, partitionKeyPath: "/LastName"); - - return await database.CreateContainerIfNotExistsAsync( - containerProperties: containerProperties, - throughput: 400); - } - // - - private static void Assert(string message, bool condition) - { - if (!condition) - { - throw new ApplicationException(message); - } - } - - private static void AssertSequenceEqual(string message, List list1, List list2) - { - if (!string.Join(",", list1.Select(family => family.Id).ToArray()).Equals( - string.Join(",", list1.Select(family => family.Id).ToArray()))) - { - throw new ApplicationException(message); - } - } - - internal sealed class Parent - { - public string FamilyName { get; set; } - public string FirstName { get; set; } - } - - internal sealed class Child - { - public string FamilyName { get; set; } - public string FirstName { get; set; } - public string Gender { get; set; } - public int Grade { get; set; } - public Pet[] Pets { get; set; } - } - - internal sealed class Pet - { - public string GivenName { get; set; } - } - - internal sealed class Address - { - public string State { get; set; } - public string County { get; set; } - public string City { get; set; } - } - - internal sealed class Family - { - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - - public string LastName { get; set; } - - public Parent[] Parents { get; set; } - - public Child[] Children { get; set; } - - public Address Address { get; set; } - - public bool IsRegistered { get; set; } - - public DateTime RegistrationDate { get; set; } - - public string PartitionKey => this.LastName; - - public static string PartitionKeyPath => "/LastName"; - } - } -} - diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Queries/Queries.csproj b/Microsoft.Azure.Cosmos.Samples/CodeSamples/Queries/Queries.csproj deleted file mode 100644 index 1efa0299b..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Queries/Queries.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - Exe - netcoreapp2.1 - latest - - - - - - - - - - - - - - PreserveNewest - - - diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/0.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/0.json deleted file mode 100644 index 204b46600..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/0.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "a79c0efd3640458e890cffe2d13ed253", - "FamilyId": 3931, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/1.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/1.json deleted file mode 100644 index e3e1d3302..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/1.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "7affe11d771e4865ba56100d1c1b3a6c", - "FamilyId": 7073, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/10.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/10.json deleted file mode 100644 index 8d7fe46b8..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/10.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "e633f3f681704672b8cf15b03acf71bd", - "FamilyId": 4730, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/11.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/11.json deleted file mode 100644 index 624eec8a3..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/11.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "17cc67a07d3d45f3ab5be91da5d0dca1", - "FamilyId": 2450, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/12.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/12.json deleted file mode 100644 index 6c6b6464a..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/12.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "56a8e5abe6634a80a37407515f406f55", - "FamilyId": 1756, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/13.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/13.json deleted file mode 100644 index 2958969b9..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/13.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "d77c6add612049fe89d2a84e032acb06", - "FamilyId": 9429, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/14.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/14.json deleted file mode 100644 index c0067f14d..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/14.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "46667adfd7bf429fb817383e2b78d680", - "FamilyId": 334, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/15.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/15.json deleted file mode 100644 index 7b208f1d1..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/15.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "d93af7d3706e4f28882920366c017cd7", - "FamilyId": 989, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/16.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/16.json deleted file mode 100644 index c4ef22758..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/16.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "5c87b20b492b4807b3bcce5690ae3be2", - "FamilyId": 5426, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/17.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/17.json deleted file mode 100644 index 6a5c97852..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/17.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "94e454fc39a04d0b82202212fb9f1609", - "FamilyId": 4144, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/18.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/18.json deleted file mode 100644 index e73809eda..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/18.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "e9226d688d354712aedaa95d4bc8d7f4", - "FamilyId": 4637, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/19.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/19.json deleted file mode 100644 index 61017f815..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/19.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "f8d178d13b904ad5938e59e7550abddc", - "FamilyId": 256, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/2.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/2.json deleted file mode 100644 index 65baf7e0d..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/2.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "8c3a0493f7184951bb8305eb59bc8351", - "FamilyId": 1040, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/20.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/20.json deleted file mode 100644 index 1d750ca57..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/20.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "4d66aeaf7884493aa23b3e132443b3bf", - "FamilyId": 2317, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/21.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/21.json deleted file mode 100644 index 6e8d43d35..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/21.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "08a58bfa0f7e4d358a59b38fa5375fc1", - "FamilyId": 8534, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/22.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/22.json deleted file mode 100644 index 24699587f..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/22.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "19ff340e73c24da2bcbba768a42aadc2", - "FamilyId": 4724, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/23.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/23.json deleted file mode 100644 index fc7bac3ce..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/23.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "c64229fc66eb4ce99c14e1ae7dcb1f5f", - "FamilyId": 4541, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/24.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/24.json deleted file mode 100644 index bb108ea14..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/24.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "291e7e87091f40b58380d5ebfc5523d1", - "FamilyId": 3178, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/25.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/25.json deleted file mode 100644 index 921d9a419..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/25.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "fc06c2477f2d4f069bc56e625de3b32d", - "FamilyId": 8713, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/26.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/26.json deleted file mode 100644 index f35685a94..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/26.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "b47d9efa6fc04fdba42dd72c45b86659", - "FamilyId": 9899, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/27.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/27.json deleted file mode 100644 index 54781aed3..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/27.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "7d3d9a0de0164da982ca31fc17efef1b", - "FamilyId": 5378, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/28.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/28.json deleted file mode 100644 index ea419f0a7..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/28.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "f2cc40ddbf124a578cda637a5ebe1310", - "FamilyId": 1545, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/29.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/29.json deleted file mode 100644 index e4539b493..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/29.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "31cd0dfb04bb49cc95840251c2ac2bd0", - "FamilyId": 8046, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/3.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/3.json deleted file mode 100644 index d54303e9b..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/3.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "5f74efef38e8462da2c9e4fb538196bc", - "FamilyId": 3963, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/30.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/30.json deleted file mode 100644 index 6b6d3bc99..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/30.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "a26e994668154b4e95615cba9578a150", - "FamilyId": 7991, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/31.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/31.json deleted file mode 100644 index a9463243b..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/31.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "81dfaa5e296a49ac9daa3e2c6a9a7a30", - "FamilyId": 4687, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/32.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/32.json deleted file mode 100644 index 6a92bb5f0..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/32.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "7f157adf4ba64c70a897c78f7fd5e077", - "FamilyId": 5546, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/33.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/33.json deleted file mode 100644 index b87f69cd0..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/33.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "54e71ec8d79c4497aa5d7d2c99f23588", - "FamilyId": 2293, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/34.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/34.json deleted file mode 100644 index 350cceb89..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/34.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "c96c6dfbd35343978b4419ca8f657988", - "FamilyId": 3936, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/35.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/35.json deleted file mode 100644 index a5875cc86..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/35.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "e1ee83e3a20941a99a1e1b84807d9833", - "FamilyId": 5468, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/36.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/36.json deleted file mode 100644 index e4724e517..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/36.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "641d637e20da4fc99aa23978746bf57c", - "FamilyId": 1187, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/37.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/37.json deleted file mode 100644 index 14a3d0ea9..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/37.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "645fe1cf6b7e4a3482f27d619219aba5", - "FamilyId": 9379, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/38.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/38.json deleted file mode 100644 index c0404e8d1..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/38.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "b25ca65596ac45b4b18961c78d82a32e", - "FamilyId": 7810, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/39.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/39.json deleted file mode 100644 index 111f505f5..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/39.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "0d7db32c6e21404fa7a8c0ff0872ae11", - "FamilyId": 9875, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/4.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/4.json deleted file mode 100644 index 20331c2d2..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/4.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "b4c6495a5f4a4a948e89252461521933", - "FamilyId": 6357, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/40.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/40.json deleted file mode 100644 index adea95851..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/40.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "a519000d1ec04389bc51f674b1cff9d0", - "FamilyId": 5420, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/41.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/41.json deleted file mode 100644 index 891f34935..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/41.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "86d37b74ed7d45e8b081257cf632f675", - "FamilyId": 1731, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/42.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/42.json deleted file mode 100644 index 5477e7c03..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/42.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "48ff8a643b2b4a3d827438a0128495a6", - "FamilyId": 3406, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/43.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/43.json deleted file mode 100644 index 39eb84de6..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/43.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "ba54bf7e37dc400ca2edc6a9632de8fb", - "FamilyId": 763, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/44.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/44.json deleted file mode 100644 index 3aace7b04..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/44.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "a7f9a9cedee9443589d4bcc84a061449", - "FamilyId": 8267, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/45.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/45.json deleted file mode 100644 index 0fe6d1ed2..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/45.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "d30e771f81d64b3a86c9e32fd0ba1c3a", - "FamilyId": 6134, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/46.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/46.json deleted file mode 100644 index b761634bc..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/46.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "ad6bbd21f9c54d7d9b2591ebb57e3d1e", - "FamilyId": 1819, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/47.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/47.json deleted file mode 100644 index 5e0b43696..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/47.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "e6f17b3046fc4c9aa10d5f33e45ed82f", - "FamilyId": 8379, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/48.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/48.json deleted file mode 100644 index cb66a61cb..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/48.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "342f1abb9d8142789c2cc0761ff2dd4f", - "FamilyId": 620, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/49.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/49.json deleted file mode 100644 index fd3b98316..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/49.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "dc1c429014d646adac5a81ae2c2f1914", - "FamilyId": 3605, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/5.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/5.json deleted file mode 100644 index 933641aca..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/5.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "fe05fabb55c8402680c4cfd48421888e", - "FamilyId": 3049, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/50.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/50.json deleted file mode 100644 index 1e9fb46de..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/50.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "f7ec238ffeb3493b8026976d21631c07", - "FamilyId": 5573, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/51.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/51.json deleted file mode 100644 index 0aff46d55..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/51.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "97daaf1fce9d41428266e69f2c9d1698", - "FamilyId": 7581, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/52.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/52.json deleted file mode 100644 index 8a3ca26f9..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/52.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "38b96202158f404fa6e28e10b376fed5", - "FamilyId": 7078, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/53.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/53.json deleted file mode 100644 index e09e3b101..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/53.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "05c3cb8c92dc477c8185ee7e84c07cf6", - "FamilyId": 3543, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/54.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/54.json deleted file mode 100644 index 3690977e2..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/54.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "ab6c105a5d1645bb97a42d5cf4d9dc6a", - "FamilyId": 8293, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/55.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/55.json deleted file mode 100644 index 5001c4f70..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/55.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "86a494efbd3647a7ae6321943149e71d", - "FamilyId": 5397, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/56.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/56.json deleted file mode 100644 index 7ccda9684..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/56.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "181880cdac034d79be934d6b4a4ecbca", - "FamilyId": 2348, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/57.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/57.json deleted file mode 100644 index 1f996bf0f..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/57.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "b7181cc65030491d8ecfca5c0828533b", - "FamilyId": 6498, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/58.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/58.json deleted file mode 100644 index 7f67cecdd..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/58.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "05adb6c704eb4f7986482749c2da0770", - "FamilyId": 784, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/59.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/59.json deleted file mode 100644 index 53b2459b1..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/59.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "884e722875b34a7eb2b1012bb5f550ed", - "FamilyId": 7643, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/6.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/6.json deleted file mode 100644 index 071c0c8a5..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/6.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "e9ed3151fe6a41f888d289a7f1cf4a73", - "FamilyId": 5036, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/60.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/60.json deleted file mode 100644 index 7cd5497bc..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/60.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "db6f4a57a7d64aa0ba7ba8a306b02aa7", - "FamilyId": 3150, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/61.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/61.json deleted file mode 100644 index 77373fc22..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/61.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "2d9eb45f62e642b793e6b34c088a6c72", - "FamilyId": 9658, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/62.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/62.json deleted file mode 100644 index 51359bd7d..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/62.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "1ce67274060c451098eb48d58c1435da", - "FamilyId": 4585, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/63.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/63.json deleted file mode 100644 index af370af25..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/63.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "4338b4f0b483468aaefdaf2d344a73c4", - "FamilyId": 7598, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/64.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/64.json deleted file mode 100644 index d8a15a816..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/64.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "93f938cd0a864179860c51a6698a826d", - "FamilyId": 5622, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/65.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/65.json deleted file mode 100644 index 2d467a9f7..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/65.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "e376119f72ab42aca5ceb8edf5f8afd4", - "FamilyId": 43, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/66.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/66.json deleted file mode 100644 index cca87b205..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/66.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "8d14f77e456e43a1ac7ab07489d4d341", - "FamilyId": 6903, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/67.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/67.json deleted file mode 100644 index 41550c187..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/67.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "52d0579510c641fab55ef54d9dde0ad2", - "FamilyId": 9463, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/68.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/68.json deleted file mode 100644 index 1f46d0c95..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/68.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "acf4cddd93724a6c8d5b71eb0843436b", - "FamilyId": 5492, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/69.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/69.json deleted file mode 100644 index 4c41f9189..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/69.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "ed54b31afaf6472b8342928b477c9d6e", - "FamilyId": 4865, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/7.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/7.json deleted file mode 100644 index 5d1c94fd7..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/7.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "df6ffc9bf2c94771b2b85d8fe98e0629", - "FamilyId": 6131, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/70.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/70.json deleted file mode 100644 index ad54c2c11..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/70.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "839edeb6854d447e97cfb3b8c5b5fb2d", - "FamilyId": 9801, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/71.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/71.json deleted file mode 100644 index d35982605..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/71.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "2c4b7c96fa6f453fad6532d408678f46", - "FamilyId": 6046, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/72.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/72.json deleted file mode 100644 index 150fe6436..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/72.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "a2fd3ac8aaca4d6fb54ec085e41eb123", - "FamilyId": 6333, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/73.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/73.json deleted file mode 100644 index f10488a80..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/73.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "39b7148eca104723abc7a622537a8c5c", - "FamilyId": 4762, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/74.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/74.json deleted file mode 100644 index e9202f454..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/74.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "3f0394114afa4b0aa7661fde577c4977", - "FamilyId": 4836, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/75.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/75.json deleted file mode 100644 index 0fa85ff55..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/75.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "b17ed790e42445409dc166727de8b33a", - "FamilyId": 585, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/76.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/76.json deleted file mode 100644 index 78234a3e5..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/76.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "74fca8a411e24139b67619c2abfc5c91", - "FamilyId": 5127, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/77.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/77.json deleted file mode 100644 index 029aeea7d..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/77.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "55ae3081bef74511a867f04adfd081ec", - "FamilyId": 3960, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/78.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/78.json deleted file mode 100644 index 519dbd075..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/78.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "78e63f22527d46f3988ae40612c9f096", - "FamilyId": 6274, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/79.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/79.json deleted file mode 100644 index 4f56d3b52..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/79.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "1398cbe118414df692cf5bd4073d7b1c", - "FamilyId": 7044, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/8.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/8.json deleted file mode 100644 index 78b0c370c..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/8.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "6cd770f86c6b4f1083c8ee80a4baac9a", - "FamilyId": 5644, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/80.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/80.json deleted file mode 100644 index fcb2d8bd4..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/80.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "a5502b8504f948b1b82d18a777a6f09a", - "FamilyId": 6894, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/81.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/81.json deleted file mode 100644 index db0bafece..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/81.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "757e50d3ec564970a44de01432b75a45", - "FamilyId": 1519, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/82.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/82.json deleted file mode 100644 index 9355fce86..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/82.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "0dcb0a4de58e453c93da70ffb5cc5134", - "FamilyId": 4758, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/83.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/83.json deleted file mode 100644 index d5698d456..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/83.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "bf8711635c314ed7813dbe6e3c69d268", - "FamilyId": 7939, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/84.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/84.json deleted file mode 100644 index 3c53517b0..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/84.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "80ed2903912c47839ad967f6333580b3", - "FamilyId": 2472, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/85.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/85.json deleted file mode 100644 index ea7177ced..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/85.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "7f1dbc9bd54f47ef9ae5ca7f7afa27a9", - "FamilyId": 409, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/86.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/86.json deleted file mode 100644 index 99550c490..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/86.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "863a9bfb4a764b3d9a92cc2537505e33", - "FamilyId": 7608, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/87.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/87.json deleted file mode 100644 index cbcd46ea7..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/87.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "4b0cce9b7bd646f48083a406fea62d44", - "FamilyId": 2002, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/88.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/88.json deleted file mode 100644 index 3d88b5eaf..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/88.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "342b30c69f9f43268334f380d54607b4", - "FamilyId": 3999, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/89.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/89.json deleted file mode 100644 index 1876ea1e6..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/89.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "7420f76ff5a3412099744b27357786b2", - "FamilyId": 8539, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/9.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/9.json deleted file mode 100644 index 80818aeed..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/9.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "a9d5b49e572a47248930788bd9727d00", - "FamilyId": 3613, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/90.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/90.json deleted file mode 100644 index b5dee4732..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/90.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "c4f2fbcbac88420a91711875f593ae65", - "FamilyId": 3120, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/91.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/91.json deleted file mode 100644 index 96a204f72..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/91.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "2b15ae63a94d4aa088583a2c8ef8aead", - "FamilyId": 4688, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/92.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/92.json deleted file mode 100644 index a21b66118..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/92.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "eba15ae752d34f03930bb94163fc3407", - "FamilyId": 8595, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/93.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/93.json deleted file mode 100644 index 23cb689d6..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/93.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "2b6e4172af174dc5925c4e4b8e986228", - "FamilyId": 166, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/94.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/94.json deleted file mode 100644 index 87cad35dc..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/94.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "4fb0a0805a37435cbdda74b6e78ec509", - "FamilyId": 6725, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/95.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/95.json deleted file mode 100644 index f5a6ae6a1..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/95.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "4df86cda85ec4ce4b36772a63a7d6d3f", - "FamilyId": 5761, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/96.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/96.json deleted file mode 100644 index ef37bfb40..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/96.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "921e7e10818a49d9830abe08e61fa904", - "FamilyId": 7146, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/97.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/97.json deleted file mode 100644 index 2a3471c2f..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/97.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "26ba85bf37134c9b8060721ff1f01a18", - "FamilyId": 5808, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/98.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/98.json deleted file mode 100644 index 986be23c8..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/98.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "2e870d09f5354a83a945e4fd4c9346bf", - "FamilyId": 5141, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/99.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/99.json deleted file mode 100644 index bc68e35bf..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Data/99.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "42379e74e575471fbe0b8a10fb0ab2da", - "FamilyId": 8224, - "LastName": "Andersen", - "Parents": [ - { - "FamilyName": null, - "FirstName": "Thomas" - }, - { - "FamilyName": null, - "FirstName": "Mary Kay" - } - ], - "Children": [ - { - "FamilyName": null, - "FirstName": "Henriette Thaulow", - "Gender": "female", - "Grade": 5, - "Pets": [ - { - "GivenName": "Fluffy" - } - ] - } - ], - "Address": { - "State": "WA", - "County": "King", - "City": "Seattle" - }, - "IsRegistered": false -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/JS/BulkImport.js b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/JS/BulkImport.js deleted file mode 100644 index c7803366d..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/JS/BulkImport.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -// Register DocDB JavaScript server API for intelisense: -// either add the file to Tools->Options->Text Editor->JavaScript->Intellisense->References and reference the group registered -// or provide path to the file explicitly. -/// -/// - -/** -* This script called as stored procedure to import lots of documents in one batch. -* The script sets response body to the number of docs imported and is called multiple times -* by the client until total number of docs desired by the client is imported. -* @param {Object[]} docs - Array of documents to import. -*/ -function bulkImport(docs) { - var collection = getContext().getCollection(); - var collectionLink = collection.getSelfLink(); - - // The count of imported docs, also used as current doc index. - var count = 0; - - // Validate input. - if (!docs) throw new Error("The array is undefined or null."); - - var docsLength = docs.length; - if (docsLength == 0) { - getContext().getResponse().setBody(0); - } - - // Call the CRUD API to create a document. - tryCreate(docs[count], callback); - - // Note that there are 2 exit conditions: - // 1) The createDocument request was not accepted. - // In this case the callback will not be called, we just call setBody and we are done. - // 2) The callback was called docs.length times. - // In this case all documents were created and we don't need to call tryCreate anymore. Just call setBody and we are done. - function tryCreate(doc, callback) { - // If you are sure that every document will contain its own (unique) id field then - // disable the option to auto generate ids. - // by leaving this on, the entire document is parsed to check if there is an id field or not - // by disabling this, parsing of the document is skipped because you're telling DocumentDB - // that you are providing your own ids. - // depending on the size of your documents making this change can have a significant - // improvement on document creation. - var options = { - disableAutomaticIdGeneration: true - }; - - var isAccepted = collection.createDocument(collectionLink, doc, options, callback); - - // If the request was accepted, callback will be called. - // Otherwise report current count back to the client, - // which will call the script again with remaining set of docs. - // This condition will happen when this stored procedure has been running too long - // and is about to get cancelled by the server. This will allow the calling client - // to resume this batch from the point we got to before isAccepted was set to false - if (!isAccepted) getContext().getResponse().setBody(count); - } - - // This is called when collection.createDocument is done and the document has been persisted. - function callback(err, doc, options) { - if (err) throw err; - - // One more document has been inserted, increment the count. - count++; - - if (count >= docsLength) { - // If we have created all documents, we are done. Just set the response. - getContext().getResponse().setBody(count); - } else { - // Create next document. - tryCreate(docs[count], callback); - } - } -} diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/JS/OrderBy.js b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/JS/OrderBy.js deleted file mode 100644 index 6a631e875..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/JS/OrderBy.js +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -// Register DocDB JavaScript server API for intelisense: -// either add the file to Tools->Options->Text Editor->JavaScript->Intellisense->References and reference the group registered -// or provide path to the file explicitly. -/// -/// - -/** -* This is run as stored procedure and does the following: -* - create ordered result set (result) which is an array sorted by orderByFieldName parameter. -* - call collection.queryDocuments. -* - in the callback for each document, insert into an array (result) -* - in the end, sort the resulting array and return it to the client -* -* Important notes: -* - The resulting record set could be too large to fit into one response -* - To walk around that, we setBody by one element and catch the REQUEST_ENTITY_TOO_LARGE exception. -* When we get the exception, return resulting set to the client with continuation token -* to continue from item index specified by this token. -* - Note that when continuation is called, it will be different transaction -* -* @param {String} filterQuery - Optional filter for query. -* @param {String} orderByFieldName - The name of the field to order by resulting set. -*/ -function orderBy(parameters) { - var filterQuery = parameters.filterQuery; - var orderByFieldName = parameters.orderByFieldName; - var continuationToken = parameters.continuationToken; - - // HTTP error codes sent to our callback funciton by DocDB server. - var ErrorCode = { - REQUEST_ENTITY_TOO_LARGE: 413, - } - - var collection = getContext().getCollection(); - var collectionLink = collection.getSelfLink(); - var result = new Array(); - - tryQuery({}); - - function tryQuery(options) { - var isAccepted = (filterQuery && filterQuery.length) ? - collection.queryDocuments(collectionLink, filterQuery, options, callback) : - collection.readDocuments(collectionLink, options, callback) - - if (!isAccepted) throw new Error("Source dataset is too large to complete the operation."); - } - - /** - * queryDocuments callback. - * @param {Error} err - Error object in case of error/exception. - * @param {Array} queryFeed - array containing results of the query. - * @param {ResponseOptions} responseOptions. - */ - function callback(err, queryFeed, responseOptions) { - if (err) { - throw err; - } - - // Iterate over document feed and store documents into the result array. - queryFeed.forEach(function (element, index, array) { - result[result.length] = element; - }); - - if (responseOptions.continuation) { - // If there is continuation, call query again providing continuation token. - tryQuery({ continuation: responseOptions.continuation }); - } else { - // We are done with querying/got all results. Sort the results and return from the script. - result.sort(compare); - - fillResponse(); - } - } - - // Compare two objects(documents) using field specified by the orderByFieldName parameter. - // Return 0 if equal, -1 if less, 1 if greater. - function compare(x, y) { - if (x[orderByFieldName] == y[orderByFieldName]) return 0; - else if (x[orderByFieldName] < y[orderByFieldName]) return -1; - return 1; - } - - // This is called in the very end on an already sorted array. - // Sort the results and set the response body. - function fillResponse() { - // Main script is called with continuationToken which is the index of 1st item to start result batch from. - // Slice the result array and discard the beginning. From now on use the 'continuationResult' var. - var continuationResult = result; - if (continuationToken) continuationResult = result.slice(continuationToken); - else continuationToken = 0; - - // Get/initialize the response. - var response = getContext().getResponse(); - response.setBody(null); - - // Take care of response body getting too large: - // Set Response iterating by one element. When we fail due to MAX response size, return to the client requesting continuation. - var i = 0; - for (; i < continuationResult.length; ++i) { - try { - // Note: setBody is very expensive vs appendBody, use appendBody with simple approximation JSON.stringify(element). - response.appendBody(JSON.stringify(continuationResult[i])); - } catch (ex) { - if (!ex.number == ErrorCode.REQUEST_ENTITY_TOO_LARGE) throw ex; - break; - } - } - - // Now next batch to return to client has i elements. - // Slice the continuationResult if needed and discard the end. - var partialResult = continuationResult; - var newContinuation = continuationToken + i; - if (continuationToken && i == 0) - { - // No more results - newContinuation = null; - } - - if (i < continuationResult.length) { - partialResult = continuationResult.slice(0, i); - } - - // Finally, set response body. - response.setBody({ result: partialResult, continuation: newContinuation }); - } -} diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/JS/SimpleScript.js b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/JS/SimpleScript.js deleted file mode 100644 index 8d13679cc..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/JS/SimpleScript.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -// Register DocDB JavaScript server API for intelisense: -// either add the file to Tools->Options->Text Editor->JavaScript->Intellisense->References and reference the group registered -// or provide path to the file explicitly. -/// -/// - -/** -* This is run as stored procedure and does the following: -* - get 1st document in the collection, convert to JSON, prepend string specified by the prefix parameter -* and set response to the result of that. -* -* @param {String} prefix - The string to prepend to the 1st document in collection. -*/ -function simple(prefix) { - var collection = getContext().getCollection(); - - // Query documents and take 1st item. - var isAccepted = collection.queryDocuments( - collection.getSelfLink(), - 'SELECT * FROM root r', - function (err, feed, options) { - if (err) throw err; - - // Check the feed and if it's empty, set the body to 'no docs found', - // Otherwise just take 1st element from the feed. - if (!feed || !feed.length) getContext().getResponse().setBody("no docs found"); - else getContext().getResponse().setBody(prefix + JSON.stringify(feed[0])); - }); - - if (!isAccepted) throw new Error("The query wasn't accepted by the server. Try again/use continuation token between API and script."); -} diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Program.cs b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Program.cs deleted file mode 100644 index c7ac109ef..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/Program.cs +++ /dev/null @@ -1,365 +0,0 @@ -namespace Cosmos.Samples.Shared -{ - using System; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Microsoft.Azure.Cosmos; - using Microsoft.Azure.Cosmos.Scripts; - using Microsoft.Extensions.Configuration; - using Newtonsoft.Json; - - //------------------------------------------------------------------------------------------------ - // This sample demonstrates the use of Cosmos's server side JavaScript capabilities - // using Stored Procedures - //------------------------------------------------------------------------------------------------ - public class Program - { - //Assign a id for your database & collection - private static readonly string DatabaseId = "samples"; - private static readonly string ContainerId = "serversidejs-samples"; - - // Async main requires c# 7.1 which is set in the csproj with the LangVersion attribute - //
- public static async Task Main(string[] args) - { - try - { - IConfigurationRoot configuration = new ConfigurationBuilder() - .AddJsonFile("appSettings.json") - .Build(); - - string endpoint = configuration["EndPointUrl"]; - if (string.IsNullOrEmpty(endpoint)) - { - throw new ArgumentNullException("Please specify a valid endpoint in the appSettings.json"); - } - - string authKey = configuration["AuthorizationKey"]; - if (string.IsNullOrEmpty(authKey) || string.Equals(authKey, "Super secret key")) - { - throw new ArgumentException("Please specify a valid AuthorizationKey in the appSettings.json"); - } - - //Read the Cosmos endpointUrl and authorisationKeys from configuration - //These values are available from the Azure Management Portal on the Cosmos Account Blade under "Keys" - //NB > Keep these values in a safe & secure location. Together they provide Administrative access to your Cosmos account - using (CosmosClient client = new CosmosClient(endpoint, authKey)) - { - await Program.RunDemoAsync(client, DatabaseId, ContainerId); - } - } - catch (CosmosException cre) - { - Console.WriteLine(cre.ToString()); - } - catch (Exception e) - { - Exception baseException = e.GetBaseException(); - Console.WriteLine("Error: {0}, Message: {1}", e.Message, baseException.Message); - } - finally - { - Console.WriteLine("End of demo, press any key to exit."); - Console.ReadKey(); - } - } - //
- - // - private static async Task RunDemoAsync( - CosmosClient client, - string databaseId, - string containerId) - { - Database database = await client.CreateDatabaseIfNotExistsAsync(DatabaseId); - - ContainerProperties containerSettings = new ContainerProperties(containerId, "/LastName"); - - // Delete the existing container to prevent create item conflicts - using (await database.GetContainer(containerId).DeleteContainerStreamAsync()) - { } - - // Create with a throughput of 1000 RU/s - Container container = await database.CreateContainerIfNotExistsAsync( - containerSettings, - throughput: 1000); - - //Run a simple script - await Program.RunSimpleScript(container); - - // Run Bulk Import - await Program.RunBulkImport(container); - - // Run OrderBy - await Program.RunOrderBy(container); - - //// Uncomment to Cleanup - //await database.DeleteAsync(); - } - // - - /// - /// Runs a simple script which just does a server side query - /// - // - private static async Task RunSimpleScript(Container container) - { - // 1. Create stored procedure for script. - string scriptFileName = @"js\SimpleScript.js"; - string scriptId = Path.GetFileNameWithoutExtension(scriptFileName); - - await TryDeleteStoredProcedure(container, scriptId); - Scripts cosmosScripts = container.Scripts; - StoredProcedureResponse sproc = await cosmosScripts.CreateStoredProcedureAsync( - new StoredProcedureProperties( - scriptId, - File.ReadAllText(scriptFileName))); - - // 2. Create a document. - SampleDocument doc = new SampleDocument - { - Id = Guid.NewGuid().ToString(), - LastName = "Estel", - Headquarters = "Russia", - Locations = new Location[] { new Location { Country = "Russia", City = "Novosibirsk" } }, - Income = 50000 - }; - - ItemResponse created = await container.CreateItemAsync(doc, new PartitionKey(doc.LastName)); - - // 3. Run the script. Pass "Hello, " as parameter. - // The script will take the 1st document and echo: Hello, . - StoredProcedureExecuteResponse response = await container.Scripts.ExecuteStoredProcedureAsync( - scriptId, - new PartitionKey(doc.LastName), - new dynamic[] { "Hello" }); - - Console.WriteLine("Result from script: {0}\r\n", response.Resource); - - await container.DeleteItemAsync(doc.Id, new PartitionKey(doc.LastName)); - } - // - - /// - /// Import many documents using stored procedure. - /// - // - private static async Task RunBulkImport(Container container) - { - string inputDirectory = @".\Data\"; - string inputFileMask = "*.json"; - int maxFiles = 2000; - int maxScriptSize = 50000; - - // 1. Get the files. - string[] fileNames = Directory.GetFiles(inputDirectory, inputFileMask); - DirectoryInfo di = new DirectoryInfo(inputDirectory); - FileInfo[] fileInfos = di.GetFiles(inputFileMask); - - // 2. Prepare for import. - int currentCount = 0; - int fileCount = maxFiles != 0 ? Math.Min(maxFiles, fileNames.Length) : fileNames.Length; - - // 3. Create stored procedure for this script. - string scriptId = "BulkImport"; - string body = File.ReadAllText(@".\JS\BulkImport.js"); - - await TryDeleteStoredProcedure(container, scriptId); - Scripts cosmosScripts = container.Scripts; - StoredProcedureResponse sproc = await cosmosScripts.CreateStoredProcedureAsync(new StoredProcedureProperties(scriptId, body)); - - // 4. Create a batch of docs (MAX is limited by request size (2M) and to script for execution. - // We send batches of documents to create to script. - // Each batch size is determined by MaxScriptSize. - // MaxScriptSize should be so that: - // -- it fits into one request (MAX request size is 16Kb). - // -- it doesn't cause the script to time out. - // -- it is possible to experiment with MaxScriptSize to get best performance given number of throttles, etc. - while (currentCount < fileCount) - { - // 5. Create args for current batch. - // Note that we could send a string with serialized JSON and JSON.parse it on the script side, - // but that would cause script to run longer. Since script has timeout, unload the script as much - // as we can and do the parsing by client and framework. The script will get JavaScript objects. - string argsJson = CreateBulkInsertScriptArguments(fileNames, currentCount, fileCount, maxScriptSize); - dynamic[] args = new dynamic[] { JsonConvert.DeserializeObject(argsJson) }; - - // 6. execute the batch. - StoredProcedureExecuteResponse scriptResult = await cosmosScripts.ExecuteStoredProcedureAsync( - scriptId, - new PartitionKey("Andersen"), - args); - - // 7. Prepare for next batch. - int currentlyInserted = scriptResult.Resource; - currentCount += currentlyInserted; - } - - // 8. Validate - int numDocs = 0; - - FeedIterator setIterator = container.GetItemQueryIterator(); - while (setIterator.HasMoreResults) - { - FeedResponse response = await setIterator.ReadNextAsync(); - numDocs += response.Count(); - } - - Console.WriteLine("Found {0} documents in the collection. There were originally {1} files in the Data directory\r\n", numDocs, fileCount); - } - // - - /// - /// Get documents ordered by some doc property. This is done using OrderBy stored procedure. - /// - // - private static async Task RunOrderBy(Container container) - { - // 1. Create or get the stored procedure. - string body = File.ReadAllText(@"js\OrderBy.js"); - string scriptId = "OrderBy"; - - await TryDeleteStoredProcedure(container, scriptId); - Scripts cosmosScripts = container.Scripts; - StoredProcedureResponse sproc = await cosmosScripts.CreateStoredProcedureAsync(new StoredProcedureProperties(scriptId, body)); - - // 2. Prepare to run stored procedure. - string orderByFieldName = "FamilyId"; - string filterQuery = string.Format(CultureInfo.InvariantCulture, "SELECT r.FamilyId FROM root r WHERE r.{0} > 10", orderByFieldName); - // Note: in order to do a range query (> 10) on this field, the collection must have a range index set for this path (see ReadOrCreateCollection). - - int? continuationToken = null; - int batchCount = 0; - do - { - // 3. Run the stored procedure. - StoredProcedureExecuteResponse response = await cosmosScripts.ExecuteStoredProcedureAsync( - scriptId, - new PartitionKey("Andersen"), - new dynamic[] { filterQuery, orderByFieldName, continuationToken }); - - // 4. Process stored procedure response. - continuationToken = response.Resource.Continuation; - - Console.WriteLine("Printing documents filtered/ordered by '{0}' and ordered by '{1}', batch #{2}:", filterQuery, orderByFieldName, batchCount++); - foreach (dynamic doc in response.Resource.Result) - { - Console.WriteLine(doc.ToString()); - } - } while (continuationToken != null); - // 5. To take care of big response, loop until Response.continuation token is null (see OrderBy.js for details). - } - // - - public class Location - { - public string City { get; set; } - public string Country { get; set; } - } - public class SampleDocument - { - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - public string LastName { get; set; } - public Location[] Locations { get; set; } - public string Headquarters { get; set; } - public int Income { get; set; } - } - - public class LoggingEntry - { - [JsonProperty("size")] - public int Size { get; set; } - - [JsonProperty("LastName")] - public string DeviceId { get; set; } - } - - public class LoggingAggregateEntry - { - [JsonProperty("id")] - public string Id { get; set; } - - [JsonProperty("isMetadata")] - public bool IsMetadata { get; set; } - - [JsonProperty("minSize")] - public int MinSize { get; set; } - - [JsonProperty("maxSize")] - public int MaxSize { get; set; } - - [JsonProperty("totalSize")] - public int TotalSize { get; set; } - - [JsonProperty("LastName")] - public string DeviceId { get; set; } - } - - internal class OrderByResult - { - public dynamic[] Result { get; set; } - public int? Continuation { get; set; } - } - - /// - /// Creates the script for insertion - /// - /// the current number of documents inserted. this marks the starting point for this script - /// the maximum number of characters that the script can have - /// Script as a string - // - private static string CreateBulkInsertScriptArguments(string[] docFileNames, int currentIndex, int maxCount, int maxScriptSize) - { - StringBuilder jsonDocumentArray = new StringBuilder(); - jsonDocumentArray.Append("["); - - if (currentIndex >= maxCount) - { - return string.Empty; - } - - jsonDocumentArray.Append(File.ReadAllText(docFileNames[currentIndex])); - - int scriptCapacityRemaining = maxScriptSize; - string separator = string.Empty; - - int i = 1; - while (jsonDocumentArray.Length < scriptCapacityRemaining && (currentIndex + i) < maxCount) - { - jsonDocumentArray.Append(", " + File.ReadAllText(docFileNames[currentIndex + i])); - i++; - } - - jsonDocumentArray.Append("]"); - return jsonDocumentArray.ToString(); - } - // - - /// - /// If a Stored Procedure is found on the DocumentCollection for the Id supplied it is deleted - /// - /// DocumentCollection to search for the Stored Procedure - /// Id of the Stored Procedure to delete - /// \ - // - private static async Task TryDeleteStoredProcedure(Container container, string sprocId) - { - Scripts cosmosScripts = container.Scripts; - - try - { - StoredProcedureResponse sproc = await cosmosScripts.ReadStoredProcedureAsync(sprocId); - await cosmosScripts.DeleteStoredProcedureAsync(sprocId); - } - catch(CosmosException ex) when (ex.StatusCode == System.Net.HttpStatusCode.NotFound) - { - //Nothing to delete - } - } - // - } -} diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/ServerSideScripts.csproj b/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/ServerSideScripts.csproj deleted file mode 100644 index 7b8e9dc66..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/ServerSideScripts/ServerSideScripts.csproj +++ /dev/null @@ -1,333 +0,0 @@ - - - - Exe - netcoreapp2.1 - latest - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Shared/Metadata.cs b/Microsoft.Azure.Cosmos.Samples/CodeSamples/Shared/Metadata.cs deleted file mode 100644 index ed75a1142..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Shared/Metadata.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace Cosmos.Samples.Shared -{ - using System; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - - public class Metadata - { - /// - /// Gets the time to live in seconds of the item in the Azure Cosmos DB service. - /// - [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "ttl")] - public int? TimeToLive { get; set; } - - /// - /// Gets the entity tag associated with the item from the Azure Cosmos DB service. - /// - [JsonProperty("_etag")] - public string Etag { get; set; } - - /// - /// Gets the last modified timestamp associated with the item from the Azure Cosmos DB service. - /// - [JsonConverter(typeof(UnixDateTimeConverter))] - [JsonProperty("_ts")] - public DateTime Timestamp { get; set; } - } -} diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Shared/SalesOrder.cs b/Microsoft.Azure.Cosmos.Samples/CodeSamples/Shared/SalesOrder.cs deleted file mode 100644 index 764c92a0d..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Shared/SalesOrder.cs +++ /dev/null @@ -1,113 +0,0 @@ -namespace Cosmos.Samples.Shared -{ - using System; - using Newtonsoft.Json; - - public class SalesOrder - { - //You can use JsonProperty attributes to control how your objects are - //handled by the Json Serializer/Deserializer - //Any of the supported JSON.NET attributes here are supported, including the use of JsonConverters - //if you really want fine grained control over the process - - //Here we are using JsonProperty to control how the Id property is passed over the wire - //In this case, we're just making it a lowerCase string but you could entirely rename it - //like we do with PurchaseOrderNumber below - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - - [JsonProperty(PropertyName = "ponumber")] - public string PurchaseOrderNumber { get; set; } - - // used to set expiration policy - [JsonProperty(PropertyName = "ttl", NullValueHandling = NullValueHandling.Ignore)] - public int? TimeToLive { get; set; } - - public DateTime OrderDate { get; set; } - public DateTime ShippedDate { get; set; } - public string AccountNumber { get; set; } - public decimal SubTotal { get; set; } - public decimal TaxAmount { get; set; } - public decimal Freight { get; set; } - public decimal TotalDue { get; set; } - public SalesOrderDetail[] Items { get; set; } - } - - public class SalesOrderDetail - { - public int OrderQty { get; set; } - public int ProductId { get; set; } - public decimal UnitPrice { get; set; } - public decimal LineTotal { get; set; } - } - - public class SalesOrder2 - { - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - - [JsonProperty(PropertyName = "ponumber")] - public string PurchaseOrderNumber { get; set; } - - public DateTime OrderDate { get; set; } - - public DateTime DueDate { get; set; } - - public DateTime ShippedDate { get; set; } - - public string AccountNumber { get; set; } - - public decimal SubTotal { get; set; } - - public decimal TaxAmt { get; set; } - - public decimal Freight { get; set; } - - public decimal TotalDue { get; set; } - - public decimal DiscountAmt { get; set; } - - public SalesOrderDetail2[] Items { get; set; } - } - public class SalesOrderDetail2 - { - public int OrderQty { get; set; } - public string ProductCode { get; set; } - public string ProductName { get; set; } - public string CurrencySymbol { get; set; } - public string CurrencyCode { get; set; } - public decimal UnitPrice { get; set; } - public decimal LineTotal { get; set; } - } - internal class Product - { - string ProductCode { get; set; } - string ProductName { get; set; } - Price UnitPrice { get; set; } - } - internal class Price - { - double Amount { get; set; } - string CurrencySymbol { get; set; } - string CurrencyCode { get; set; } - } - - /// - /// SalesOrderDocument extends the Microsoft.Azure.Documents.Resource class - /// This gives you access to internal properties of a Resource such as ETag, SelfLink, Id etc. - /// When working with objects extending from Resource you get the benefit of not having to - /// dynamically cast between Document and your POCO. - /// - public class SalesOrderDocument - { - public string PurchaseOrderNumber { get; set; } - public DateTime OrderDate { get; set; } - public DateTime ShipDate { get; set; } - public string AccountNumber { get; set; } - public decimal SubTotal { get; set; } - public decimal TaxAmt { get; set; } - public decimal Freight { get; set; } - public decimal TotalDue { get; set; } - public SalesOrderDetail[] Items { get; set; } - } -} diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Shared/Shared.csproj b/Microsoft.Azure.Cosmos.Samples/CodeSamples/Shared/Shared.csproj deleted file mode 100644 index 9696b83c3..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/Shared/Shared.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - netstandard2.0 - - - - - - - diff --git a/Microsoft.Azure.Cosmos.Samples/CodeSamples/appSettings.json b/Microsoft.Azure.Cosmos.Samples/CodeSamples/appSettings.json deleted file mode 100644 index 4cf7ea200..000000000 --- a/Microsoft.Azure.Cosmos.Samples/CodeSamples/appSettings.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "EndPointUrl": "https://localhost:8081", - "AuthorizationKey": "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==" -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/AzureFunctions/AzureFunctions.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/AzureFunctions/AzureFunctions.csproj index 5543126ee..c778ed09e 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/AzureFunctions/AzureFunctions.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/AzureFunctions/AzureFunctions.csproj @@ -1,4 +1,4 @@ - + netcoreapp2.1 v2 @@ -13,7 +13,7 @@ - + @@ -24,4 +24,4 @@ Never - \ No newline at end of file + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/BulkSupport/BulkSupport.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/BulkSupport/BulkSupport.csproj index 64b5a17e8..37a2c441b 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/BulkSupport/BulkSupport.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/BulkSupport/BulkSupport.csproj @@ -1,4 +1,4 @@ - + Exe @@ -12,7 +12,7 @@ - + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/ChangeFeed/ChangeFeed.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/ChangeFeed/ChangeFeed.csproj index 65d50d00a..36d0d5d40 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/ChangeFeed/ChangeFeed.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/ChangeFeed/ChangeFeed.csproj @@ -1,4 +1,4 @@ - + Exe @@ -8,7 +8,7 @@ latest - + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/ContainerManagement/ContainerManagement.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/ContainerManagement/ContainerManagement.csproj index 62b58b56b..eb5a9c519 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/ContainerManagement/ContainerManagement.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/ContainerManagement/ContainerManagement.csproj @@ -1,4 +1,4 @@ - + Exe @@ -7,7 +7,7 @@ - + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/CustomSerialization/CustomSerialization.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/CustomSerialization/CustomSerialization.csproj index af6130678..ff8dfe34f 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/CustomSerialization/CustomSerialization.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/CustomSerialization/CustomSerialization.csproj @@ -1,4 +1,4 @@ - + Exe @@ -6,7 +6,7 @@ latest - + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/DatabaseManagement/DatabaseManagement.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/DatabaseManagement/DatabaseManagement.csproj index 62b58b56b..eb5a9c519 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/DatabaseManagement/DatabaseManagement.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/DatabaseManagement/DatabaseManagement.csproj @@ -1,4 +1,4 @@ - + Exe @@ -7,7 +7,7 @@ - + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/Handlers/HandlerSample.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/Handlers/HandlerSample.csproj index a12d5cf6d..f7bbbf820 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/Handlers/HandlerSample.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/Handlers/HandlerSample.csproj @@ -1,4 +1,4 @@ - + Exe @@ -16,7 +16,7 @@ - + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/IndexManagement/IndexManagement.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/IndexManagement/IndexManagement.csproj index 62b58b56b..eb5a9c519 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/IndexManagement/IndexManagement.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/IndexManagement/IndexManagement.csproj @@ -1,4 +1,4 @@ - + Exe @@ -7,7 +7,7 @@ - + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/ItemManagement/ItemManagement.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/ItemManagement/ItemManagement.csproj index af6130678..ff8dfe34f 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/ItemManagement/ItemManagement.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/ItemManagement/ItemManagement.csproj @@ -1,4 +1,4 @@ - + Exe @@ -6,7 +6,7 @@ latest - + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/NonPartitionContainerMigration/NonPartitionContainerMigration.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/NonPartitionContainerMigration/NonPartitionContainerMigration.csproj index af6130678..ff8dfe34f 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/NonPartitionContainerMigration/NonPartitionContainerMigration.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/NonPartitionContainerMigration/NonPartitionContainerMigration.csproj @@ -1,4 +1,4 @@ - + Exe @@ -6,7 +6,7 @@ latest - + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/Queries/Queries.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/Queries/Queries.csproj index af6130678..ff8dfe34f 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/Queries/Queries.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/Queries/Queries.csproj @@ -1,4 +1,4 @@ - + Exe @@ -6,7 +6,7 @@ latest - + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/ServerSideScripts/ServerSideScripts.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/ServerSideScripts/ServerSideScripts.csproj index 5f30da329..775282da9 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/ServerSideScripts/ServerSideScripts.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/ServerSideScripts/ServerSideScripts.csproj @@ -1,4 +1,4 @@ - + Exe @@ -7,7 +7,7 @@ - + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/TransactionalBatch/TransactionalBatch.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/TransactionalBatch/TransactionalBatch.csproj index 15089eff3..109ebc632 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/TransactionalBatch/TransactionalBatch.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/TransactionalBatch/TransactionalBatch.csproj @@ -1,4 +1,4 @@ - + Exe @@ -12,7 +12,7 @@ - +