Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqltranslate函数不能正确的翻译 0 参数的函数;例如:TODAY(), NOW() #39

Open
Smartbicaopan opened this issue Apr 23, 2023 · 1 comment

Comments

@Smartbicaopan
Copy link

Smartbicaopan commented Apr 23, 2023

    版本:
    <dependency>
        <groupId>com.scudata.esproc</groupId>
        <artifactId>esproc</artifactId>
        <version>20230228</version>
    </dependency>
    
    function.xml 中片段:
  <FUNCTION name="TODAY" paramcount="0">
    <INFO dbtype="ORACLE" value="SYSDATE"/>
    <INFO dbtype="SQLSVR" value="GETDATE()"/>
    <INFO dbtype="DB2" value="CURRENT DATE"/>
    <INFO dbtype="MYSQL" value="CURDATE()"/>
    <INFO dbtype="TERADATA" value="DATE"/>
    <INFO dbtype="POSTGRES" value="CURRENT_DATE"/>
    <INFO dbtype="ESPROC" value="now@d()"/>
  </FUNCTION>        

  System.out.println(SQLUtil.translate("TODAY()", "ORACLE"));   输出是 TODAY()  ;不符合 function.xml 中的配置
@RQWangXiaoJun
Copy link
Contributor

RQWangXiaoJun commented Apr 23, 2023

已修改,更新了SQLUtil类。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants