mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add db2 PageUtils support
This commit is contained in:
@@ -63,6 +63,10 @@ public class SQLUtils {
|
||||
if (JdbcUtils.POSTGRESQL.equals(dbType)) {
|
||||
return toPGString(sqlObject);
|
||||
}
|
||||
|
||||
if (JdbcUtils.DB2.equals(dbType)) {
|
||||
return toDB2String(sqlObject);
|
||||
}
|
||||
|
||||
return toSQLServerString(sqlObject);
|
||||
}
|
||||
@@ -110,6 +114,14 @@ public class SQLUtils {
|
||||
String sql = out.toString();
|
||||
return sql;
|
||||
}
|
||||
|
||||
public static String toDB2String(SQLObject sqlObject) {
|
||||
StringBuilder out = new StringBuilder();
|
||||
sqlObject.accept(new DB2OutputVisitor(out));
|
||||
|
||||
String sql = out.toString();
|
||||
return sql;
|
||||
}
|
||||
|
||||
public static String toSQLServerString(SQLObject sqlObject) {
|
||||
StringBuilder out = new StringBuilder();
|
||||
|
||||
Reference in New Issue
Block a user