Using the V2 Javascript SDK for CosmosDb, I'm getting the TOP 10 items from the db:  var query = "SELECT TOP 10 * FROM People"  const querySpec = {     query: query };  var result = await container.items.query(querySpec).toArray();   How...
How can I get or figure out the size of a document stored in Cosmos DB?  Is this something already stored within document?...
The documentation states equivalence for the code snippets below. But in the first case I can do operations on the documents collection inside the callback function, while the map function in the latter only works on one document. I do want to group...
I have JSON like   {   "id": "58d99ca3231f13b9ecbbbca4",   "50records": [     {       "aomsLineNbr": 1,       "licenses": [         {           "productKey": "84fc2cde-9735-4cea-b97a-3cd627d3d0a5...
as a total JavaScript beginner, how do I actually develop for it? I mean, I've seen https://azure.microsoft.com/en-us/documentation/articles/documentdb-programming/ but there was no mentioning of a development environment.  Is there something lik...
I am trying to write a simple stored procedure which runs a SQL query and I want to restrict the results by using MaxItemCount property. Query produces 3 documents but I want to return only 1 document. I am forcing this restriction using MaxItemCount...
In a DocDb stored procedure, as the first step in a process retrieving data that I'm mutating, I read and then use the data iff it matches the etag like so:  collection.readDocument(reqSelf, function(err, doc) {     if (doc._etag == requestEtag)...
I am trying to use the Cosmos DB RestAPI to list the databases on my local (emulator) instance and not getting very far. Does anyone have any idea what I am doing wrong here...  var crypto = require("crypto");   var request = require('req...
I created an azure function as well as a documentDB database with a users collection, however, I am stuck at connecting the two of them to each other. I want to just send a username and the function queries the database then returns the user with tha...
Let's say I have the following document:  { "Id": "1", "Properties": [     {         "Name": "Name1",         "PropertyTypes": [             "Type1"         ]     },     {         "Name&...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.