使用 Rebean API 返回 SQL 查询 BOXI R3 Webi

发布于 2024-08-31 01:16:33 字数 102 浏览 2 评论 0原文

有谁知道如何使用 Rebean API 返回 Webi 中对象的 SQL 吗?我已经获得了该列的 ReportExpression,但是从那里我很难检索对象的 SQL。

谢谢

Has anyone figured out how to return the SQL for an object that is in Webi using the Rebean API? I have got the ReportExpression of the column but, from there I am having a difficult time retrieving the SQL of the object.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

百变从容 2024-09-07 01:16:33

我相信你已经深入了解了这个结构。要获取生成的 SQL,您应该通过 rebean 的 DataProvider。我没有尝试这样做来查看我得到了什么值,但是查看 API 方法,DataProvider 的 getQuery().getSQL() 方法似乎就是您正在寻找的。

为了更清楚起见:

DocumentInstance docInst; // get your DocumentInstance object via preferred route
DataProvider dp = docInst.getDataProviders().getItem(0); // retrieve the DataProvider that youw ould like the SQL for
String sql = dp.getQuery().getSQL(); // the SQL out of the DataProvider

getSQL() 已弃用,因此它可能会在下一版本中消失

I believe you have gone to far into the structure. To get the SQL that is generated you should go through the DataProvider of the rebean. I have not attempted this to see what values I got, but looking at the API methods the getQuery().getSQL() methods of the DataProvider appear to be what you are looking for.

For better clarity:

DocumentInstance docInst; // get your DocumentInstance object via preferred route
DataProvider dp = docInst.getDataProviders().getItem(0); // retrieve the DataProvider that youw ould like the SQL for
String sql = dp.getQuery().getSQL(); // the SQL out of the DataProvider

getSQL() is deprecated so it may disappear in the next version

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文