Azure Cosmos DB

◷ Reading Time: 2 minutes

cosmosCreate

Creates a document in your collection.

 cosmosCreate (connection, payload, partitionKey)
  • connection: connection string to the Cosmos DB collection.
  • payload: json content of the document to be created.
  • partitionKey: key to filter partitions in the collection.

cosmosQuery

Runs a SQL query against the documents in your collection.

documents |cosmosQuery (connection, query, partitionKey)
  • connection: connection string to the Cosmos DB collection.
  • query: Cosmos DB compatible SQL query.
  • partitionKey: key to filter partitions in the collection.

cosmosUpdate

Updates a document in your collection.

 cosmosCreate (connection, payload, documentId, partitionKey)
  • connection: connection string to the Cosmos DB collection.
  • payload: json content of the document to be updated..
  • documentId: Identifier of the document to be updated.
  • partitionKey: key to filter partitions in the collection.

cosmosDelete

Deletes a document in your collection.

 cosmosDelete (connection, documentId, partitionKey)
  • connection: connection string to the Cosmos DB collection.
  • documentId: Identifier of the document to be deleted.
  • partitionKey: key to filter partitions in the collection.
Updated on June 1, 2020

Was this article helpful?

Related Articles