我搜索了文档并尝试使用谷歌搜索,但我没有找到问题的直接答案:
I have searched documentation and tried google that, but I did not find a straight answer to the question:
如何在 Sequelize 中调用存储过程?
我已经搜索了 Sequelize 的文档,但我什至没有在其中找到程序"一词的痕迹.
I have searched the documentation of Sequelize but I have even not found a trace of the word "procedure" in that.
我得到的最接近的是这个 bug-report-turned-feature-request:github/sequelize/sequelize/issues/959
The closest I got was this bug-report-turned-feature-request: github/sequelize/sequelize/issues/959
引用链接:
我想象的会很棒:
sequelize.query('CALL calculateFees();').success( function (settingName1, settingName2, settingName3, users) { });他们提到可以调用存储过程,但没有提供语法.
They mention that it is possible to call stored procedures, but the syntax is not provided.
谁能给我一个语法正确的例子?
谢谢.
推荐答案将 success 更改为 spread 就可以了.请注意,这仅适用于 sequelize 2.0
Change success to spread and you're good to go. Note that this will only work on sequlize 2.0
更多推荐
在 Sequelize.js 中调用存储过程
发布评论