mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Use isPgsqlDbType to check all pg-like database
This commit is contained in:
@@ -84,9 +84,7 @@ public class SQLParserUtils {
|
||||
return new MySqlStatementParser(sql, features);
|
||||
}
|
||||
|
||||
if (JdbcUtils.isPgsqlDbType(dbType)
|
||||
|| JdbcUtils.ENTERPRISEDB.equals(dbType)
|
||||
|| JdbcUtils.POLARDB.equals(dbType)) {
|
||||
if (JdbcUtils.isPgsqlDbType(dbType)) {
|
||||
return new PGSQLStatementParser(sql);
|
||||
}
|
||||
|
||||
@@ -126,9 +124,7 @@ public class SQLParserUtils {
|
||||
return new MySqlExprParser(sql);
|
||||
}
|
||||
|
||||
if (JdbcUtils.isPgsqlDbType(dbType)
|
||||
|| JdbcUtils.ENTERPRISEDB.equals(dbType)
|
||||
|| JdbcUtils.POLARDB.equals(dbType)) {
|
||||
if (JdbcUtils.isPgsqlDbType(dbType)) {
|
||||
return new PGExprParser(sql);
|
||||
}
|
||||
|
||||
@@ -160,9 +156,7 @@ public class SQLParserUtils {
|
||||
return new MySqlLexer(sql);
|
||||
}
|
||||
|
||||
if (JdbcUtils.isPgsqlDbType(dbType)
|
||||
|| JdbcUtils.ENTERPRISEDB.equals(dbType)
|
||||
|| JdbcUtils.POLARDB.equals(dbType)) {
|
||||
if (JdbcUtils.isPgsqlDbType(dbType)) {
|
||||
return new PGLexer(sql);
|
||||
}
|
||||
|
||||
@@ -194,8 +188,7 @@ public class SQLParserUtils {
|
||||
return new MySqlSelectQueryBlock();
|
||||
}
|
||||
|
||||
if (JdbcUtils.POSTGRESQL.equals(dbType)
|
||||
|| JdbcUtils.ENTERPRISEDB.equals(dbType)) {
|
||||
if (JdbcUtils.isPgsqlDbType(dbType)) {
|
||||
return new PGSelectQueryBlock();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user