mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-13 04:57:28 +00:00
(improvement)(headless) Update server and core, server calls core one-way (#592)
* (improvement)(headless) Update server and core, server calls core one-way * (improvement)(Auth) When obtaining the user information, determine whether the user is a system admin. --------- Co-authored-by: jolunoluo
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package com.tencent.supersonic.headless.api.enums;
|
||||
|
||||
|
||||
public enum DatasourceQuery {
|
||||
|
||||
SQL_QUERY("sql_query"),
|
||||
TABLE_QUERY("table_query");
|
||||
|
||||
private String name;
|
||||
|
||||
|
||||
DatasourceQuery(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.tencent.supersonic.headless.api.enums;
|
||||
|
||||
|
||||
public enum EngineType {
|
||||
|
||||
TDW(0, "tdw"),
|
||||
MYSQL(1, "mysql"),
|
||||
DORIS(2, "doris"),
|
||||
CLICKHOUSE(3, "clickhouse"),
|
||||
KAFKA(4, "kafka"),
|
||||
H2(5, "h2");
|
||||
|
||||
|
||||
private Integer code;
|
||||
|
||||
private String name;
|
||||
|
||||
EngineType(Integer code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
@@ -27,4 +28,8 @@ public class QueryS2SQLReq {
|
||||
return Lists.newArrayList(modelIds);
|
||||
}
|
||||
|
||||
public String getModelIdStr() {
|
||||
return String.join(",", modelIds.stream().map(Object::toString).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -82,6 +82,10 @@ public class QueryStructReq {
|
||||
return Lists.newArrayList(modelIds);
|
||||
}
|
||||
|
||||
public String getModelIdStr() {
|
||||
return String.join(",", modelIds.stream().map(Object::toString).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
public Set<Long> getModelIdSet() {
|
||||
return modelIds;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user