📜  sequelize 获取所有数据 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:28.336000             🧑  作者: Mango

代码示例1
db.Sensors.findAll({
    where: {
        nodeid: node.nodeid
    }
}).success(function (sensors) {
        var nodedata = JSON.parse(JSON.stringify(node)); // this is my trick
        nodedata.sensors = sensors;
        nodesensors.push(nodedata);
        response.json(nodesensors);
});