Major upgrades to documentdb-utils
Also, C# .NET examples for documentdb-lumenize aggregations
I've just now finished pushing a major upgrade to documentdb-utils and adding C# .NET examples to documentdb-lumenize docs.
With support for upserts, id-based links, and maxItemCount -1, a lot of the API design decisions that I made when I originally created documentdb-utils have been overcome by events... a testament to the rapid development the Azure team is doing. So, I decided to go back to square one and rather than expose my own API, I thought I'd just wrap DocumentClient to upgrade it. Essentially every line of code in the package is new. The WrappedClient class takes a raw DocumentClient and upgrades the methods to have 429 error delay/retry support as well as work with higher-order async functions. It'll even send the same query to multiple collections and aggregate the results as well as aggregate the results of executing the same sproc on multiple collections.
Also, I realized that I had started to create a bunch of other helpful utilities that provide a lot of value and decided to share them in documentdb-utils including:
- The ability to
require()
other packages when writing server-side scripts - The ability to load all sprocs or UDFs in a directory to all collections in a list. This is incredibly useful when working with multiple partitions.
- Mixins for async.js and underscore.js so you can use those JavaScript utility libraries in your sprocs
- functions to generate id-based links and arrays of links (incidentally, you can pass in an array of links to many of the WrappedClient methods)
- A few other niceties
Also, I knew it was possible but I never bothered before to use documentdb-lumenize (aggregations) from a C# .NET project. I've done so now and included that documentation and examples.
Anyway, I thought I'd share with this group in case any of you want to check out the upgrades.
Analysis and Visualization running on Node.js, DocumentDB, and Earl Grey Tea