Merge pull request #4725 from dataease/pr@dev@pages

Pr@dev@pages
This commit is contained in:
taojinlong 2023-03-08 17:16:36 +08:00 committed by GitHub
commit 5d91026e17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View File

@ -777,6 +777,14 @@ public class JdbcProvider extends DefaultJdbcProvider {
case StarRocks:
MysqlConfiguration mysqlConfiguration = new Gson().fromJson(datasource.getConfiguration(), MysqlConfiguration.class);
mysqlConfiguration.getJdbc();
case redshift:
RedshiftConfiguration redshiftConfiguration = new Gson().fromJson(datasource.getConfiguration(), RedshiftConfiguration.class);
if(redshiftConfiguration.getDataBase().length() > 64 || redshiftConfiguration.getDataBase().length() < 1){
throw new Exception("Invalid database name");
}
if(!redshiftConfiguration.getDataBase().matches("\"^[a-z][a-z0-9_+.@-]*$\"")){
throw new Exception("Invalid database name");
}
default:
break;
}

View File

@ -1328,4 +1328,9 @@ public class EsQueryProvider extends QueryProvider {
public String getResultCount(boolean isTable, String sql, List<ChartViewFieldDTO> xAxis, List<ChartFieldCustomFilterDTO> fieldCustomFilter, List<DataSetRowPermissionsTreeDTO> rowPermissionsTree, List<ChartExtFilterRequest> extFilterRequestList, Datasource ds, ChartViewWithBLOBs view) {
return null;
}
@Override
public String sqlForPreview(String table, Datasource ds) {
return "SELECT * FROM " + String.format(EsSqlLConstants.KEYWORD_TABLE, table);
}
}