what does success transaction return in sequelize

Solutions on MaxInterview for what does success transaction return in sequelize by the best coders in the world

showing results for - "what does success transaction return in sequelize"
Domenico
18 Jan 2017
1   const t = await sequelizeConfig.transaction({
2        autocommit: false
3    })
4    
5    const userDeatils = await User.create({
6    firstName: 'Abraham',
7    lastName: 'Lincoln'
8  }, {transaction: t})
9  
10      await t.commit()
11       return t
12        
13        This return transaction(t) on success returns finished property which is 'commit' on success
14        
15        So here in response we can check response.finised == 'commit
16        
17        finished =='commit'
18       
19        if(response.finised == 'commit){
20        
21        return res.json({
22        
23        code:'',
24        ................
25        })
26        
27