首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >oracle12和oracle19上的ref-cursor的Jooq codegen类

oracle12和oracle19上的ref-cursor的Jooq codegen类
EN

Stack Overflow用户
提问于 2021-03-15 19:06:41
回答 1查看 75关注 0票数 1

我在包上下文中有plsql代码:

代码语言:javascript
复制
type t_demand_for_excel_upload is record
(
    bsns_oper_name t_string,
    demand_date date,
    demand_hour integer,
    demand_value number
);
type t_cur_demands_for_excel_upload is ref cursor return t_demand_for_excel_upload;

procedure get_demands_for_excel_upload
(
    p_calc_version_id in integer,
    p_shop_id in integer,
    p_start_date in date,
    p_end_date in date,
    p_result out t_cur_demands_for_excel_upload
);

Jooq版本:

代码语言:javascript
复制
<jooq.groupId>org.jooq.pro</jooq.groupId>
<jooq.version>3.12.3</jooq.version>
<jooq.generator.db.dialect>org.jooq.meta.oracle.OracleDatabase</jooq.generator.db.dialect>

当我使用oracle 12c生成代码时,它在java中看起来像这样:

代码语言:javascript
复制
public static Result<Record> getDemandsForExcelUpload(Configuration configuration, BigInteger pCalcVersionId, BigInteger pShopId, LocalDate pStartDate, LocalDate pEndDate) {
        GetDemandsForExcelUpload f = new GetDemandsForExcelUpload();
        f.setPCalcVersionId(pCalcVersionId);
        f.setPShopId(pShopId);
        f.setPStartDate(pStartDate);
        f.setPEndDate(pEndDate);

        f.execute(configuration);
        return f.getReturnValue();
    }

和我预期的一样,使用Result<Record>

在maven中调试:

在oracle 19c上,生成的代码如下所示:

代码语言:javascript
复制
public static TDemandForExcelUploadRecord getDemandsForExcelUpload(Configuration configuration, BigInteger pCalcVersionId, BigInteger pShopId, LocalDate pStartDate, LocalDate pEndDate) {
        GetDemandsForExcelUpload f = new GetDemandsForExcelUpload();
        f.setPCalcVersionId(pCalcVersionId);
        f.setPShopId(pShopId);
        f.setPStartDate(pStartDate);
        f.setPEndDate(pEndDate);

        f.execute(configuration);
        return f.getReturnValue();
    }
public class TDemandForExcelUploadRecord extends UDTRecordImpl<TDemandForExcelUploadRecord> implements Record4<String, LocalDate, BigInteger, BigDecimal> { ...

我的光标在哪里?请帮帮忙。

Maven debug for oracle 19c:

在这两种情况下,jooq设置是相同的

EN

回答 1

Stack Overflow用户

发布于 2021-03-24 23:59:39

这似乎是jOOQ 3.14中的一个错误,或者更确切地说,是一个缺失的功能。我们没有对强类型REF CURSOR类型进行任何集成测试,所以我们没有注意到这种回归。为此,我创建了两个问题:

在3.15.0和3.14.9版本实现该功能请求之前,添加对类型化的types

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66636795

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档