Search in sources :

Example 1 with PGSQLObject

use of com.alibaba.druid.sql.dialect.postgresql.ast.PGSQLObject in project druid by alibaba.

the class SQLObjectImpl method output.

public void output(Appendable buf) {
    DbType dbType = null;
    if (this instanceof OracleSQLObject) {
        dbType = DbType.oracle;
    } else if (this instanceof MySqlObject) {
        dbType = DbType.mysql;
    } else if (this instanceof PGSQLObject) {
        dbType = DbType.postgresql;
    } else if (this instanceof SQLDbTypedObject) {
        dbType = ((SQLDbTypedObject) this).getDbType();
    }
    accept(SQLUtils.createOutputVisitor(buf, dbType));
}
Also used : PGSQLObject(com.alibaba.druid.sql.dialect.postgresql.ast.PGSQLObject) OracleSQLObject(com.alibaba.druid.sql.dialect.oracle.ast.OracleSQLObject) MySqlObject(com.alibaba.druid.sql.dialect.mysql.ast.MySqlObject) DbType(com.alibaba.druid.DbType)

Aggregations

DbType (com.alibaba.druid.DbType)1 MySqlObject (com.alibaba.druid.sql.dialect.mysql.ast.MySqlObject)1 OracleSQLObject (com.alibaba.druid.sql.dialect.oracle.ast.OracleSQLObject)1 PGSQLObject (com.alibaba.druid.sql.dialect.postgresql.ast.PGSQLObject)1