Azure mobile apps CRUD operations on SQL table (node.js backend)

╄→尐↘猪︶ㄣ 提交于 2019-12-05 20:01:48

You could issue SQL in your api

var api = {
get: (request, response, next) => {
    var query = {
        sql: 'UPDATE TodoItem SET complete=@completed',
        parameters: [
            { name: 'completed', value: request.params.completed }
        ]
    };

    request.azureMobile.data.execute(query)
    .then(function (results) {
        response.json(results);
    });
}};
module.exports = api;

That is from their sample on GitHub Here is the full list of samples to take a look at

Why are you doing a custom API for a table? Just define the table within the tables directory and add any custom authorization / authentication.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!