Answers for "what does success transaction return in sequelize"

0

what does success transaction return in sequelize

const t = await sequelizeConfig.transaction({
        autocommit: false
    })
    
    const userDeatils = await User.create({
    firstName: 'Abraham',
    lastName: 'Lincoln'
  }, {transaction: t})
  
      await t.commit()
       return t
        
        This return transaction(t) on success returns finished property which is 'commit' on success
        
        So here in response we can check response.finised == 'commit
        
        finished =='commit'
       
        if(response.finised == 'commit){
        
        return res.json({
        
        code:'',
        ................
        })
Posted by: Guest on February-21-2021

Code answers related to "what does success transaction return in sequelize"

Code answers related to "Javascript"

Browse Popular Code Answers by Language