Microsoft is continuing to build on it’s cloud based document database designed for web applications and today is announcing support for JavaScript Language Integrated Queries.
Azure DocumentDB’s database engine is purposefully designed from the ground up to provide first class support for JSON and JavaScript. Our vision is for JavaScript developers to build applications without having to deal with the entity mappers, schemas, code generation tools, type adornments and other duct tapes. — Azure Blog
Azure DocumentDB allows developers to store data in native JSON format and then perform queries on that data including using stored procedures. The diagram below shows how JSON data is stored in Azure DocumentDB
The query for all “exports” from documents with the headquarters of Belgium previously looked like this.
function() { var filterQuery = 'SELECT * from companies c where c.headquarter = "Belgium"'; var isAccepted = <strong>.queryDocuments(</strong>.getSelfLink(), filterQuery, function(err, docs, options) { if (err) throw new Error(err.number + err.message); __.response.setBody(docs); }); if (!isAccepted) __.response.setBody('Query timed out'); }
But with JavaScript Language Integrated Queries, that same query can be expressed with this syntax.
function() { var resp = __.filter(function(company) { return company.headquarter == 'Belgium'; }); if (!resp.isAccepted) __.response.setBody('Query timed out'); }
For more information on this announcement including a SQL to JavaScript Query API Cheat Sheet, visit the Azure Blog.
Cloud management is difficult to do manually, especially if you work with multiple cloud…
Azure’s scalable infrastructure is often cited as one of the primary reasons why it's the…
https://www.youtube.com/watch?v=wDzCN0d8SeA Watch our "Unlocking the Power of AI in your Software Development Life Cycle (SDLC)"…
FinOps is a strategic approach to managing cloud costs. It combines financial management best practices…
Using Kubernetes with Azure combines the power of Kubernetes container orchestration and the cloud capabilities…
In the intricate landscape of modern business, compliance is both a cornerstone of operational integrity…