Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sequelize update sql

const Tokens = db.define('tokens', {
    token: {
        type: sequelize.STRING
    }
});
// Update tokens table where id
Tokens.update(
          { token: 'new token' },
          { where: {id: idVar} }
     ).then(tokens => {
          console.log(tokens);
     }).catch(err => console.log('error: ' + err));
 
PREVIOUS NEXT
Tagged: #sequelize #update #sql
ADD COMMENT
Topic
Name
8+5 =