开发者

Return SQL query BOXI R3 Webi using Rebean API

开发者 https://www.devze.com 2022-12-28 18:27 出处:网络
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 开发者_C百科there I am having a difficult time

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 开发者_C百科there I am having a difficult time retrieving the SQL of the object.

Thanks


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号