Tag: azmos

使用Azure Mobile Apps for Node在Cosmos数据库上执行SQL查询连接

目前,我正在为使用Azure移动应用程序和Node.js和Azure Cosmos DB(文档数据库)开发移动系统的后端。 我使用的是这里给出的例子: https://github.com/Azure/azure-mobile-apps-node/blob/master/samples/custom-api-sql-stmt/api/completeall.js 到目前为止这么好 – 但是,每当我运行这个SQL,我得到: TypeError: provider.read is not a function at Function.module.exports.api.execute (x:\x\node_modules\azure-mobile-apps\src\data\index.js:32:18 我需要运行的SQL如下所示: SELECT c.id, c.Email FROM Profile c JOIN d in c.DeviceIDs WHERE d.DeviceID = @deviceId 这是因为我的数据是嵌套的,就像这样(Cosmos中的Profile集合) – 我需要获取DeviceID匹配的logging: [ { "id": "2ca572d0-858d-4376-8537-c228a8379638", "Email": "test@user.com", "Name": "Test User 1", "OrgRoles": null, "DeviceIDs": [ { "DeviceID": "123445555555", "DeviceCode": "1234" } […]