feat(oscar): add OSCAR database support

This commit is contained in:
t8y2 committed 2026-06-30 20:07:55 +08:00
1 parent d3272b4750
commit 25dcbeb7e4
33 files changed
+204 -19

No files matched your search

@@ -18,6 +18,10 @@ describe("connectionAttemptTimeout", () => {
expect(connectionAttemptTimeoutMs({ db_type: "prestosql", connect_timeout_secs: 5, transport_layers: [] })).toBe(AGENT_DRIVER_MIN_CONNECT_TIMEOUT_SECS * 1000 + CONNECTION_ATTEMPT_TIMEOUT_BUFFER_MS);
});
it("uses the startup floor for generic JDBC plugin connections", () => {
expect(connectionAttemptTimeoutMs({ db_type: "jdbc", connect_timeout_secs: 5, transport_layers: [] })).toBe(AGENT_DRIVER_MIN_CONNECT_TIMEOUT_SECS * 1000 + CONNECTION_ATTEMPT_TIMEOUT_BUFFER_MS);
});
it("uses the startup floor for ZooKeeper agent connections", () => {
expect(connectionAttemptTimeoutMs({ db_type: "zookeeper", connect_timeout_secs: 5, transport_layers: [] })).toBe(AGENT_DRIVER_MIN_CONNECT_TIMEOUT_SECS * 1000 + CONNECTION_ATTEMPT_TIMEOUT_BUFFER_MS);
});
@@ -27,6 +27,7 @@ const DRIVER_STARTUP_FLOOR_TYPES = new Set<DatabaseType>([
"snowflake",
"trino",
"prestosql",
"jdbc",
"hive",
"db2",
"informix",
@@ -35,6 +36,7 @@ const DRIVER_STARTUP_FLOOR_TYPES = new Set<DatabaseType>([
"bigquery",
"kylin",
"sundb",
"oscar",
"tdengine",
"xugu",
"iotdb",
@@ -142,6 +142,9 @@ export function connectionUrlPlaceholder(dbType: DatabaseType): string {
case "tdengine":
return "tdengine://user:password@host:6041/database";
case "oscar":
return "oscar://user:password@host:2003/database";
case "xugu":
return "xugu://user:password@host:5138/database";
+1
View File
@@ -58,6 +58,7 @@ const SCHEME_PROFILES: Record<string, ConnectionProfile> = {
questdb: { type: "questdb", profile: "questdb", label: "QuestDB", defaultPort: 8812 },
tdengine: { type: "tdengine", profile: "tdengine", label: "TDengine", defaultPort: 6041 },
"taos-ws": { type: "tdengine", profile: "tdengine", label: "TDengine", defaultPort: 6041 },
oscar: { type: "oscar", profile: "oscar", label: "神通 OSCAR", defaultPort: 2003 },
xugu: { type: "xugu", profile: "xugu", label: "XuguDB", defaultPort: 5138 },
iotdb: { type: "iotdb", profile: "iotdb", label: "Apache IoTDB", defaultPort: 6667 },
iris: { type: "iris", profile: "iris", label: "IRIS", defaultPort: 1972 },
@@ -30,6 +30,7 @@ export const SCHEMA_AWARE_TYPES = new Set<DatabaseType>([
"db2",
"informix",
"xugu",
"oscar",
"iotdb",
"iris",
"duckdb",
@@ -64,6 +65,7 @@ export const TREE_SCHEMA_TYPES = new Set<DatabaseType>([
"h2",
"informix",
"xugu",
"oscar",
"iotdb",
"iris",
"duckdb",
@@ -83,6 +83,7 @@ const NAVICAT_STYLE_TABLE_DATA_TYPES = new Set<DatabaseType>([
"informix",
"bigquery",
"sundb",
"oscar",
"databend",
]);
@@ -282,6 +282,7 @@ const capabilityByType: Partial<Record<DatabaseType, TableStructureCapabilities>
starrocks: mysqlCapabilities,
goldendb: mysqlCapabilities,
sundb: mysqlCapabilities,
oscar: unsupportedCapabilities,
databend: mysqlCapabilities,
gbase: gbaseCapabilities,
postgres: postgresCapabilities,
@@ -276,6 +276,7 @@ const DATA_TYPE_OPTION_ALIASES: Partial<Record<DatabaseType, string>> = {
starrocks: "mysql",
goldendb: "mysql",
sundb: "mysql",
oscar: "oracle",
gbase: "mysql",
gaussdb: "postgres",
kwdb: "postgres",