-1
我想從sequelize.js對我的postgres數據庫運行一個函數。當我通過RazorSQL(數據庫IDE)運行它時,該函數可以正常工作,但在節點服務器上從sequelize.js運行時會引發錯誤。使用Sequelize運行postgres函數js
我試過它的兩個函數有和沒有參數。
CoffeeScript的節點服務器
query = "SELECT * FROM order.base_orders(); "
sequelize.query(query, null, {raw: true}).success (rows) =>
deferred.resolve rows
.error (error) =>
deferred.reject error
它返回下面的錯誤上。
{
"error": {
"name": "error",
"length": 216,
"severity": "ERROR",
"code": "42883",
"hint": "No function matches the given name and argument types. You might need to add explicit type casts.",
"position": "15",
"file": "parse_func.c",
"line": "306",
"routine": "ParseFuncOrColumn",
"sql": "SELECT * FROM order.base_orders(); "
}
}