[BUG] callProcedure() does not put the return value in the results object
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, node.js
调研方向
从 callProcedure() 入口点开始,针对 IBM i ODBC 设置运行提供的 Node.js 复现。跟踪存储过程返回值与输出参数一同被处理的方式,并考虑当 results 对象的 return 属性包含 42 而 parameters 包含 "goodbye" 时所执行的工作。
由索引模型根据 Issue 内容生成。
描述
Describe your system
odbcPackage Version: 2.4.8- unixODBC version: 2.3.9-1
- ODBC Driver: IBM i Access ODBC Driver 1.1.0.27-0
- Database Name: DB2 for i
- Database Version: IBM i 7.4
- Database OS: IBM i 7.4
- Node.js Version: v18.18.2
- Node.js OS: IBM i 7.4
Describe the bug
When calling stored procedures with callProcedure(), the return value is not populated into the results object. Instead it's just undefined.
Expected behavior
The results object property "return" should have the return value from the stored procedure.
Code to reproduce
SQL to create an example stored procedure:
CREATE OR REPLACE PROCEDURE NODEODBC.test_return (
INOUT message varchar(128)
)
LANGUAGE SQL
BEGIN
set message = 'goodbye';
return 42;
END;
NodeJS code:
import odbc from 'odbc';
let conn = await odbc.connect('DSN=*LOCAL');
let parameters = ['hi there'];
let result = await conn.callProcedure(null, 'NODEODBC', 'TEST_RETURN', parameters);
console.log(result);
Results from NodeJS:
node stored-proc-return-value.js
[
statement: '{ CALL NODEODBC.TEST_RETURN (?) }',
parameters: [ 'goodbye' ],
return: undefined,
count: 0,
columns: []
]
Results from ACS Run SQL scripts:
call NODEODBC.test_return('hi there');
[ 02/06/2024, 11:20:41 AM ] Run Selected...
call NODEODBC.test_return('hi there')
Return Code = 42
Output Parameter #1 (MESSAGE) = goodbye
Statement ran successfully (2 ms)
- 主要语言
- JavaScript
- 星标
- 159
- 派生
- 92
- 平均合并
- 5 小时 59 分钟
- 30 天内合并 PR
- 3
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
IBM/node-odbc 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 85/100
-
security
难度 3/5 1-2 天 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 48/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 38/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
naver/egjs-flicking#971 ·
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
RADAR-base/radar-self-enrolment-ui#118 ·
维护者通常 1 天内回复