Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sequelize select fields

template.findAll({
    where: {
        user_id: req.params.user_id 
    },
    attributes: ['id', 'template_name'],  // SELECT FIELDS  
}).then(function (list) {
    res.status(200).json(list);
})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sequelize #select #fields
ADD COMMENT
Topic
Name
4+8 =