Package com.alibaba.druid.sql.dialect.db2.visitor

Examples of com.alibaba.druid.sql.dialect.db2.visitor.DB2ParameterizedOutputVisitor


        if (JdbcUtils.SQL_SERVER.equals(dbType) || JdbcUtils.JTDS.equals(dbType)) {
            return new SQLServerExprParser(sql);
        }
       
        if (JdbcUtils.DB2.equals(dbType)) {
            return new DB2ExprParser(sql);
        }

        return new SQLExprParser(sql);
    }
View Full Code Here


        super(config, JdbcConstants.DB2);
    }

    @Override
    public SQLStatementParser createParser(String sql) {
        return new DB2StatementParser(sql);
    }
View Full Code Here

        if (JdbcUtils.H2.equals(dbType)) {
            return new MySqlStatementParser(sql);
        }
       
        if (JdbcUtils.DB2.equals(dbType)) {
            return new DB2StatementParser(sql);
        }

        return new SQLStatementParser(sql);
    }
View Full Code Here

                + "             " //
                + "                AND OH.ORDER_ID = ? ) AS TEMP_TAB ) AS TEMP_TAB_WITH_IDX "//
                + " WHERE TEMP_TAB_WITH_IDX.IDX > 0 AND TEMP_TAB_WITH_IDX.IDX <= 20" //
                + "";

        DB2StatementParser parser = new DB2StatementParser(sql);
        List<SQLStatement> statementList = parser.parseStatementList();
        SQLStatement stmt = statementList.get(0);
        print(statementList);

        Assert.assertEquals(1, statementList.size());
View Full Code Here

public class DB2Values_Test extends DB2Test {

    public void test_0() throws Exception {
        String sql = "values 1";

        DB2StatementParser parser = new DB2StatementParser(sql);
        List<SQLStatement> statementList = parser.parseStatementList();
        SQLStatement stmt = statementList.get(0);
        print(statementList);

        Assert.assertEquals(1, statementList.size());
View Full Code Here

public class DB2SelectTest_1 extends DB2Test {

    public void test_0() throws Exception {
        String sql = "SELECT * FROM DSN81010.EMP FETCH FIRST 5 ROWS ONLY;";

        DB2StatementParser parser = new DB2StatementParser(sql);
        List<SQLStatement> statementList = parser.parseStatementList();
        SQLStatement stmt = statementList.get(0);
        print(statementList);

        Assert.assertEquals(1, statementList.size());

View Full Code Here

public class DB2SelectTest_0 extends DB2Test {

    public void test_0() throws Exception {
        String sql = "SELECT * FROM DSN81010.EMP;";

        DB2StatementParser parser = new DB2StatementParser(sql);
        List<SQLStatement> statementList = parser.parseStatementList();
        SQLStatement stmt = statementList.get(0);
        print(statementList);

        Assert.assertEquals(1, statementList.size());

View Full Code Here

public class DB2SelectTest_4 extends DB2Test {

    public void test_0() throws Exception {
        String sql = "select * from t OPTIMIZE FOR 10 ROWS";

        DB2StatementParser parser = new DB2StatementParser(sql);
        List<SQLStatement> statementList = parser.parseStatementList();
        SQLStatement stmt = statementList.get(0);
        print(statementList);

        Assert.assertEquals(1, statementList.size());

View Full Code Here

public class DB2SelectTest_3 extends DB2Test {

    public void test_0() throws Exception {
        String sql = "select * from t for read only";

        DB2StatementParser parser = new DB2StatementParser(sql);
        List<SQLStatement> statementList = parser.parseStatementList();
        SQLStatement stmt = statementList.get(0);
        print(statementList);

        Assert.assertEquals(1, statementList.size());

View Full Code Here

public class DB2SelectTest_2 extends DB2Test {

    public void test_0() throws Exception {
        String sql = "SELECT CTRYNUM, FMS_INSTANCE_CD FROM DBEFMSDR.FMSA_O_WW_CTRY_AG WHERE ACCT_YR=? WITH UR";

        DB2StatementParser parser = new DB2StatementParser(sql);
        List<SQLStatement> statementList = parser.parseStatementList();
        SQLStatement stmt = statementList.get(0);
        print(statementList);

        Assert.assertEquals(1, statementList.size());
View Full Code Here

TOP

Related Classes of com.alibaba.druid.sql.dialect.db2.visitor.DB2ParameterizedOutputVisitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.