关于sequelize连接操作mysql的一个小小地方的疑惑
就是在学习Sequelize Executing raw SQL queries这一节时,显示出来的结果是两次重复的。 例如:
sequelize.query('select * from pets where name = ?', { raw: true, replacements: ['Odie'] }).then(myTableRows => {
console.log(myTableRows);
});
执行结果:
[ [ TextRow {
id: 'd-1544782050448',
name: 'Odie',
gender: 0,
birth: '2008-08-08',
createdAt: 1544782050448,
updatedAt: 1544782050448,
version: 0 } ],
[ TextRow {
id: 'd-1544782050448',
name: 'Odie',
gender: 0,
birth: '2008-08-08',
createdAt: 1544782050448,
updatedAt: 1544782050448,
version: 0 } ] ]
是不是我哪写错了,还是就是这样?