Skip to content

Tag: azure-cosmosdb

CosmosDB count using OrderBy multiple conditions

I am using Azure CosmosDB, the model contains Id, and creationTime properties. What I am trying to do is count entries within time interval. I looked how to achieve it using LINQ but could not find a solution. What I used than is SQL. This is what I tried: Bare in mind the values i showed are for display purp…

Cosmos db sql query for search in array

I have a document structure like below and I try to implement searching for user by fields author and partNames, so user can do query like SELECT * FROM c WHERE CONTAINS(c.author, ‘John’) and user will get in result the id=1 document because the name of author was John. The next step is to allow u…