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

Examples of com.alibaba.druid.sql.dialect.postgresql.visitor.PGExportParameterVisitor


        return new PGWallVisitor(this);
    }

    @Override
    public ExportParameterVisitor createExportParameterVisitor() {
        return new PGExportParameterVisitor();
    }
View Full Code Here


        String sql = "select fname, count(*) from t where fid = 1 group by fname order by 1";

        PGSQLStatementParser parser = new PGSQLStatementParser(sql);
        SQLStatement stmt = parser.parseStatementList().get(0);

        PGExportParameterVisitor visitor = new PGExportParameterVisitor();
        stmt.accept(visitor);
       
        List<Object> parameters = visitor.getParameters();
       
        Assert.assertEquals(1, parameters.size());
        Assert.assertEquals(1, parameters.get(0));
    }
View Full Code Here

        PGSQLStatementParser parser = new PGSQLStatementParser(sql);
        SQLStatement stmt = parser.parseStatementList().get(0);

        List<Object> parameters = new ArrayList<Object>();
        PGExportParameterVisitor visitor = new PGExportParameterVisitor(parameters);
        stmt.accept(visitor);
       
        Assert.assertEquals(1, parameters.size());
        Assert.assertEquals(1, parameters.get(0));
    }
View Full Code Here

TOP

Related Classes of com.alibaba.druid.sql.dialect.postgresql.visitor.PGExportParameterVisitor

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.