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

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


        return sql;
    }
   
    public static String toPGString(SQLObject sqlObject) {
        StringBuilder out = new StringBuilder();
        sqlObject.accept(new PGOutputVisitor(out));
       
        String sql = out.toString();
        return sql;
    }
View Full Code Here


        return sql;
    }

    public static String toPGString(SQLObject sqlObject) {
        StringBuilder out = new StringBuilder();
        sqlObject.accept(new PGOutputVisitor(out));

        String sql = out.toString();
        return sql;
    }
View Full Code Here

        if (JdbcUtils.MYSQL.equals(dbType)) {
            return new MySqlOutputVisitor(out);
        }

        if (JdbcUtils.POSTGRESQL.equals(dbType)) {
            return new PGOutputVisitor(out);
        }

        if (JdbcUtils.SQL_SERVER.equals(dbType)) {
            return new SQLServerOutputVisitor(out);
        }
View Full Code Here

              PGASTVisitor pgVisitor = (PGASTVisitor) visitor;

                if (pgVisitor.visit(this)) {
                    if (pgVisitor instanceof PGOutputVisitor)
                    {
                        PGOutputVisitor pgv = (PGOutputVisitor) pgVisitor;
                        pgv.print(this.rowCount.toString());
                        if (this.offset != null)
                        {
                            pgv.print(" OFFSET ");
                            pgv.print(this.offset.toString());
                        }
                    }
                    else
                    {
                        acceptChild(visitor, offset);
View Full Code Here

import com.alibaba.druid.sql.dialect.postgresql.visitor.PGOutputVisitor;

public class PGTest extends TestCase {
  protected String output(List<SQLStatement> stmtList) {
    StringBuilder out = new StringBuilder();
    PGOutputVisitor visitor = new PGOutputVisitor(out);

    for (SQLStatement stmt : stmtList) {
      stmt.accept(visitor);
    }
View Full Code Here

        SQLStatement statemen = statementList.get(0);

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

        StringBuilder out = new StringBuilder();
        PGOutputVisitor visitor = new PGOutputVisitor(out);
        statemen.accept(visitor);

        System.out.println(out.toString());

        Assert.assertEquals(expect, out.toString());
View Full Code Here

        return sql;
    }

    public static String toPGString(SQLObject sqlObject) {
        StringBuilder out = new StringBuilder();
        sqlObject.accept(new PGOutputVisitor(out));

        String sql = out.toString();
        return sql;
    }
View Full Code Here

        if (JdbcUtils.MYSQL.equals(dbType)) {
            return new MySqlOutputVisitor(out);
        }

        if (JdbcUtils.POSTGRESQL.equals(dbType)) {
            return new PGOutputVisitor(out);
        }

        if (JdbcUtils.SQL_SERVER.equals(dbType)) {
            return new SQLServerOutputVisitor(out);
        }
View Full Code Here

        return sql;
    }

    public static String toPGString(SQLObject sqlObject) {
        StringBuilder out = new StringBuilder();
        sqlObject.accept(new PGOutputVisitor(out));

        String sql = out.toString();
        return sql;
    }
View Full Code Here

            JdbcUtils.H2.equals(dbType)) {
            return new MySqlOutputVisitor(out);
        }

        if (JdbcUtils.POSTGRESQL.equals(dbType)) {
            return new PGOutputVisitor(out);
        }

        if (JdbcUtils.SQL_SERVER.equals(dbType) || JdbcUtils.JTDS.equals(dbType)) {
            return new SQLServerOutputVisitor(out);
        }
View Full Code Here

TOP

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

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.