Crate cosmos_utils[][src]

Structs

This struct keeps the static state of cosmos DB, it must be initialized before any cosmos functions are called.

A collection of keys to partition on

Enums

Functions

Returns a specific document from the cosmos DB together with a corresponding etag

Gets the data from a blob storage

Insert a document into the cosmos database and returning an etag from the response if successful

Modifies a document in cosmos by applying transform closure on the existing document and either inserting the returned value or just returning it to the caller

Modifies a document in cosmos by applying transform closure on the existing document and then inserting the returned document and returning the transformed document if successful If the transform closure fails then no insertion is performed and the error it fails with is returned

Modifies a document in cosmos by applying transform async closure on the existing document and then inserting the returned document and returning the transformed document if successful If the transform closure fails then no insertion is performed and the error it fails with is returned

Modifies a document in cosmos by applying transform async closure on the existing document and then inserting the returned document and returning both the transformed document, the old document and the etag if successful. If the transform closure fails then no insertion is performed and the error it fails with is returned

Modify in cosmos but does not retry on failure which is useful when one needs to pass in a FnOnce closure

Uploads form data to the blob storage and returns the blob id

Uploads a new form data image to the blob storage and returns the image_id

Upsert a document into the cosmos database and returning an etag from the response if successful