Skip to content
Advertisement

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 purposes.

Select * Except particular properties in Cosmos DB with SQL API

Consider the following, I have a document that looks something like this: I want to get everything from the document EXCEPT $metadata and $version The obvious solution would be to: However, my document may expand dynamically, hence why the above is suboptimal. I therefore figured that it may be better to exclude just $metadata and $version. I looked at different

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 user ask for document by

Advertisement