fix(sundb): bundle the vendor JDBC driver so SunDB works out of the box

This commit is contained in:
zipg authored and GitHub committed 2026-09-30 15:39:21 +08:00
1 parent 20ffc62249
commit 4f4e2a790b
19 files changed
+81 -5

No files matched your search

+1
View File
@@ -1,6 +1,7 @@
**/libs/*.jar **/libs/*.jar
!drivers/cache/libs/CacheDB.jar !drivers/cache/libs/CacheDB.jar
!drivers/oscar/libs/oscarJDBC8.jar !drivers/oscar/libs/oscarJDBC8.jar
!drivers/sundb/libs/sundb8-1.0.2.jar
!drivers/transwarp/libs/inceptor-sdk-transwarp-6.1.0-SNAPSHOT.jar !drivers/transwarp/libs/inceptor-sdk-transwarp-6.1.0-SNAPSHOT.jar
!drivers/uxdb/libs/uxdbjdbc-2.1.2.3p.jre8.jar !drivers/uxdb/libs/uxdbjdbc-2.1.2.3p.jre8.jar
gradle.properties gradle.properties
+3 -1
View File
@@ -111,7 +111,9 @@ attributes(
- Confirm release registry generation emits `external_driver_required: true`. - Confirm release registry generation emits `external_driver_required: true`.
Current external-driver agents include BigQuery and SunDB. Current external-driver agents include BigQuery. SunDB used to carry the flag;
its vendor JAR is now vendored under `drivers/sundb/libs/` and bundled into
the Agent, so it is a normal bundled driver again.
## 6. JRE Selection ## 6. JRE Selection
+5 -1
View File
@@ -1,4 +1,9 @@
dependencies { dependencies {
// The vendor ships no Maven-published artifact, so the driver JAR is
// vendored under libs/ (git-whitelisted like cache/gbase8a/oscar/uxdb) and
// bundled into the Agent so SunDB connections work without user setup.
// A newer vendor JAR can still be supplied per connection via
// `jdbc_driver_paths`, which the Agent loads in an isolated URLClassLoader.
implementation fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: 'libs', include: ['*.jar'])
} }
@@ -6,7 +11,6 @@ tasks.named('shadowJar') {
manifest { manifest {
attributes( attributes(
'Agent-Label': 'SunDB', 'Agent-Label': 'SunDB',
'Agent-External-Driver': 'true',
'Main-Class': 'com.dbx.agent.sundb.SundbAgent' 'Main-Class': 'com.dbx.agent.sundb.SundbAgent'
) )
} }
Binary file not shown.
@@ -90,6 +90,7 @@ import { mysqlCleartextPasswordAuthEnabled, setMysqlCleartextPasswordAuthEnabled
import { applyDamengSslUrlParams, damengSslFormConfig } from "@/lib/database/damengSslOptions"; import { applyDamengSslUrlParams, damengSslFormConfig } from "@/lib/database/damengSslOptions";
import { DAMENG_BUILTIN_DRIVER_PROFILE, DAMENG_CUSTOM_DRIVER_PROFILE, DAMENG_DEFAULT_JDBC_DRIVER_CLASS, damengCustomJdbcUrl, damengDriverModeForConfig, defaultDamengJdbcUrl, type DamengDriverMode } from "@/lib/database/damengDriverOptions"; import { DAMENG_BUILTIN_DRIVER_PROFILE, DAMENG_CUSTOM_DRIVER_PROFILE, DAMENG_DEFAULT_JDBC_DRIVER_CLASS, damengCustomJdbcUrl, damengDriverModeForConfig, defaultDamengJdbcUrl, type DamengDriverMode } from "@/lib/database/damengDriverOptions";
import { doltSystemTablesVisible, isDoltDriverProfile, setDoltSystemTablesVisible } from "@/lib/database/doltProfile"; import { doltSystemTablesVisible, isDoltDriverProfile, setDoltSystemTablesVisible } from "@/lib/database/doltProfile";
import { SUNDB_DEFAULT_JDBC_DRIVER_CLASS, sundbJdbcDriverClass } from "@/lib/database/sundbDriverOptions";
import { DamengJvmSystemPropertyError, damengJvmSystemPropertiesText, parseDamengJvmSystemProperties } from "@/lib/database/damengJvmOptions"; import { DamengJvmSystemPropertyError, damengJvmSystemPropertiesText, parseDamengJvmSystemProperties } from "@/lib/database/damengJvmOptions";
import { copyToClipboard } from "@/lib/common/clipboard"; import { copyToClipboard } from "@/lib/common/clipboard";
import { configuredDatabaseProductName, connectionConfigFingerprint, databaseInfoCopyText, databaseInfoRows, normalizeDatabaseConnectionInfo, type DatabaseInfoField } from "@/lib/connection/connectionDatabaseInfo"; import { configuredDatabaseProductName, connectionConfigFingerprint, databaseInfoCopyText, databaseInfoRows, normalizeDatabaseConnectionInfo, type DatabaseInfoField } from "@/lib/connection/connectionDatabaseInfo";
@@ -2888,6 +2889,15 @@ function applyProfile(val: string, preserveConnectionFields = false) {
jdbcDriverPathsInput.value = ""; jdbcDriverPathsInput.value = "";
jdbcManualClasspathOpen.value = true; jdbcManualClasspathOpen.value = true;
} }
if (profile.type === "sundb") {
// The SunDB Agent bundles the vendor JDBC driver, so the connection works
// without a JAR; the classpath field is only an override for anyone who
// wants the Agent to load a newer vendor JAR in isolation.
form.value.connection_string = undefined;
form.value.jdbc_driver_class = SUNDB_DEFAULT_JDBC_DRIVER_CLASS;
form.value.jdbc_driver_paths = [];
jdbcDriverPathsInput.value = "";
}
if (profile.type === "transwarp") { if (profile.type === "transwarp") {
form.value.connection_string = undefined; form.value.connection_string = undefined;
} }
@@ -3097,7 +3107,7 @@ watch(
sysdba: config.sysdba || isOracleSysUser(config), sysdba: config.sysdba || isOracleSysUser(config),
oracle_connection_type: config.oracle_connection_type || "service_name", oracle_connection_type: config.oracle_connection_type || "service_name",
connection_string: config.connection_string, connection_string: config.connection_string,
jdbc_driver_class: config.jdbc_driver_class, jdbc_driver_class: config.db_type === "sundb" ? sundbJdbcDriverClass(config) : config.jdbc_driver_class,
jdbc_driver_paths: config.jdbc_driver_paths || [], jdbc_driver_paths: config.jdbc_driver_paths || [],
redis_connection_mode: config.redis_connection_mode || "standalone", redis_connection_mode: config.redis_connection_mode || "standalone",
redis_sentinel_master: config.redis_sentinel_master || "", redis_sentinel_master: config.redis_sentinel_master || "",
@@ -3597,7 +3607,7 @@ function dbCategoryForOption(value: string): DbCategoryKey | undefined {
const selectedDbIcon = computed(() => (isPluginConnection.value ? "plugin" : iconTypeMap[selectedType.value] || selectedProfile().icon || selectedType.value)); const selectedDbIcon = computed(() => (isPluginConnection.value ? "plugin" : iconTypeMap[selectedType.value] || selectedProfile().icon || selectedType.value));
function supportsNativeAgentJdbcDriverConfigType(dbType: DatabaseType): boolean { function supportsNativeAgentJdbcDriverConfigType(dbType: DatabaseType): boolean {
return dbType === "prestosql" || dbType === "bigquery" || dbType === "dameng"; return dbType === "prestosql" || dbType === "bigquery" || dbType === "dameng" || dbType === "sundb";
} }
const jdbcBackedDatabaseTypes = new Set<DatabaseType>(["jdbc", "prestosql", "bigquery"]); const jdbcBackedDatabaseTypes = new Set<DatabaseType>(["jdbc", "prestosql", "bigquery"]);
@@ -3613,6 +3623,11 @@ const jdbcxHighPrivilegeExtensionsAllowed = computed({
}, },
}); });
const supportsNativeAgentJdbcDriverConfig = computed(() => supportsNativeAgentJdbcDriverConfigType(form.value.db_type) && (form.value.db_type !== "dameng" || isDamengCustomDriver.value)); const supportsNativeAgentJdbcDriverConfig = computed(() => supportsNativeAgentJdbcDriverConfigType(form.value.db_type) && (form.value.db_type !== "dameng" || isDamengCustomDriver.value));
const nativeAgentJdbcDriverHint = computed(() => {
if (form.value.db_type === "dameng") return t("connection.damengCustomDriverHint");
if (form.value.db_type === "sundb") return t("connection.sundbCustomDriverHint");
return t("connection.jdbcPluginHint");
});
const isH2FileMode = computed(() => form.value.db_type === "h2" && h2ConnectionMode.value === "file"); const isH2FileMode = computed(() => form.value.db_type === "h2" && h2ConnectionMode.value === "file");
const isH2CustomDriver = computed(() => form.value.db_type === "h2" && form.value.driver_profile === "h2-custom"); const isH2CustomDriver = computed(() => form.value.db_type === "h2" && form.value.driver_profile === "h2-custom");
const usesLocalFilePathInput = computed(() => isLocalFileTypeDb(form.value.db_type) && (form.value.db_type !== "h2" || isH2FileMode.value)); const usesLocalFilePathInput = computed(() => isLocalFileTypeDb(form.value.db_type) && (form.value.db_type !== "h2" || isH2FileMode.value));
@@ -5073,6 +5088,13 @@ function connectionConfigForSubmit(id: string, generatedName = "", validatePlugi
config.jdbc_driver_paths = []; config.jdbc_driver_paths = [];
} }
} }
if (config.db_type === "sundb") {
// The SunDB Agent bundles the vendor driver; an empty classpath means the
// Agent resolves the driver class on its own classloader. A non-empty
// classpath still overrides it with a user-supplied JAR.
config.jdbc_driver_class = sundbJdbcDriverClass(config);
config.jdbc_driver_paths = parsedJdbcDriverPaths();
}
if (jdbcBackedDatabaseTypes.has(config.db_type) || gaussdbConnectionMode(config) === "m-jdbc") { if (jdbcBackedDatabaseTypes.has(config.db_type) || gaussdbConnectionMode(config) === "m-jdbc") {
if (config.db_type === "jdbc") { if (config.db_type === "jdbc") {
if (config.driver_profile === "dremio") { if (config.driver_profile === "dremio") {
@@ -9155,7 +9177,7 @@ function openExternalUrl(url: string) {
<span /> <span />
<div class="col-span-3 space-y-2"> <div class="col-span-3 space-y-2">
<p class="text-xs text-muted-foreground"> <p class="text-xs text-muted-foreground">
{{ form.db_type === "dameng" ? t("connection.damengCustomDriverHint") : t("connection.jdbcPluginHint") }} {{ nativeAgentJdbcDriverHint }}
</p> </p>
<div class="flex flex-wrap gap-2"> <div class="flex flex-wrap gap-2">
<Button type="button" variant="outline" size="sm" @click="emit('openDriverStore', { target: 'tab', tab: 'jdbc' })"> <Button type="button" variant="outline" size="sm" @click="emit('openDriverStore', { target: 'tab', tab: 'jdbc' })">
@@ -63,6 +63,7 @@ const FEATURE_MESSAGES: FeatureMessages[] = [
{ feature: "SQLite table rebuild notice", keys: ["structureEditor.sqliteRebuildNotice"] }, { feature: "SQLite table rebuild notice", keys: ["structureEditor.sqliteRebuildNotice"] },
{ feature: "custom types", keys: ["customType.kinds.composite", "customType.tabs.properties", "customType.members.empty", "customType.properties.empty", "customType.ddl.empty", "customType.ddl.incomplete", "contextMenu.viewDetails"], translated: true }, { feature: "custom types", keys: ["customType.kinds.composite", "customType.tabs.properties", "customType.members.empty", "customType.properties.empty", "customType.ddl.empty", "customType.ddl.incomplete", "contextMenu.viewDetails"], translated: true },
{ feature: "Dameng object compilation", keys: ["contextMenu.compileObjectFailedTitle", "contextMenu.compileObjectFailedMessage"], locales: EXCEPT_AZ_TR, translated: true }, { feature: "Dameng object compilation", keys: ["contextMenu.compileObjectFailedTitle", "contextMenu.compileObjectFailedMessage"], locales: EXCEPT_AZ_TR, translated: true },
{ feature: "SunDB bundled JDBC driver (#10732)", keys: ["connection.sundbCustomDriverHint"], translated: true },
{ feature: "user administration Host change", keys: ["userAdmin.changeHost", "userAdmin.newHost"], translated: true }, { feature: "user administration Host change", keys: ["userAdmin.changeHost", "userAdmin.newHost"], translated: true },
{ feature: "plugin batch actions", keys: ["pluginPlatform.batchDuplicateSources", "pluginPlatform.batchRefreshFailed"], locales: EXCEPT_AZ_TR }, { feature: "plugin batch actions", keys: ["pluginPlatform.batchDuplicateSources", "pluginPlatform.batchRefreshFailed"], locales: EXCEPT_AZ_TR },
{ feature: "plugin marketplace sorting (#10078)", keys: under("pluginPlatform", ["sortBy", "sortByName", "sortByRecentlyUpdated", "sortByRecentlyListed", "sortByUpdatesFirst"]), locales: EXCEPT_AZ_TR, translated: true }, { feature: "plugin marketplace sorting (#10078)", keys: under("pluginPlatform", ["sortBy", "sortByName", "sortByRecentlyUpdated", "sortByRecentlyListed", "sortByUpdatesFirst"]), locales: EXCEPT_AZ_TR, translated: true },
+1
View File
@@ -746,6 +746,7 @@ export default withEnglishFallback({
damengDriverModeHint: "DM8 üçün daxil edilmiş drayverdən istifadə edin. DM6 və ya başqa uyğun versiya üçün onun rəsmi JDBC JAR faylını seçin.", damengDriverModeHint: "DM8 üçün daxil edilmiş drayverdən istifadə edin. DM6 və ya başqa uyğun versiya üçün onun rəsmi JDBC JAR faylını seçin.",
damengCustomDriverHint: "Lisenziyalı mənbədən Dameng JDBC JAR faylı seçin. Fərdi drayver Dameng agenti daxilində təcrid olunur və ümumi JDBC plaginini tələb etmir.", damengCustomDriverHint: "Lisenziyalı mənbədən Dameng JDBC JAR faylı seçin. Fərdi drayver Dameng agenti daxilində təcrid olunur və ümumi JDBC plaginini tələb etmir.",
damengCustomDriverRequired: "Dameng JDBC drayverinin JAR faylını seçin.", damengCustomDriverRequired: "Dameng JDBC drayverinin JAR faylını seçin.",
sundbCustomDriverHint: "SunDB agenti vendor JDBC drayverini özü ilə gətirir, ona görə JAR tələb olunmur (drayver sinfi csii.sundb.jdbc.SundbDriver). Yalnız daha yeni vendor drayveri yükləmək üçün burada JAR göstərin; fərdi drayver agent daxilində təcrid olunaraq yüklənir.",
redisTlsInsecure: "Sertifikat yoxlamasını ötür", redisTlsInsecure: "Sertifikat yoxlamasını ötür",
redisTlsInsecureHint: "Öz imzalı sertifikatlar və ya özəl CA-lar üçün redis-cli --tls --insecure əmrinə bərabərdir.", redisTlsInsecureHint: "Öz imzalı sertifikatlar və ya özəl CA-lar üçün redis-cli --tls --insecure əmrinə bərabərdir.",
mysqlTlsMode: "TLS rejimi", mysqlTlsMode: "TLS rejimi",
+1
View File
@@ -1042,6 +1042,7 @@ export default {
damengDriverModeHint: "Use the bundled driver for DM8. For DM6 or another compatible version, select its official JDBC JAR.", damengDriverModeHint: "Use the bundled driver for DM8. For DM6 or another compatible version, select its official JDBC JAR.",
damengCustomDriverHint: "Select a Dameng JDBC JAR from a licensed source. The custom driver is isolated inside the Dameng agent and does not require the generic JDBC plugin.", damengCustomDriverHint: "Select a Dameng JDBC JAR from a licensed source. The custom driver is isolated inside the Dameng agent and does not require the generic JDBC plugin.",
damengCustomDriverRequired: "Select a Dameng JDBC driver JAR.", damengCustomDriverRequired: "Select a Dameng JDBC driver JAR.",
sundbCustomDriverHint: "The SunDB Agent ships the vendor JDBC driver, so no JAR is needed (driver class csii.sundb.jdbc.SundbDriver). Provide a JAR here only to load a newer vendor driver; custom drivers are loaded in isolation inside the Agent.",
redisTlsInsecure: "Skip certificate verification", redisTlsInsecure: "Skip certificate verification",
redisTlsInsecureHint: "Equivalent to redis-cli --tls --insecure, for self-signed certificates or private CAs.", redisTlsInsecureHint: "Equivalent to redis-cli --tls --insecure, for self-signed certificates or private CAs.",
mysqlTlsMode: "TLS Mode", mysqlTlsMode: "TLS Mode",
+2
View File
@@ -1661,6 +1661,8 @@ export default withEnglishFallback({
damengDriverModeHint: "Use el controlador incluido para DM8. Para DM6 u otra versión compatible, seleccione su JAR JDBC oficial.", damengDriverModeHint: "Use el controlador incluido para DM8. Para DM6 u otra versión compatible, seleccione su JAR JDBC oficial.",
damengCustomDriverHint: "Seleccione un JAR JDBC de Dameng de una fuente con licencia. El controlador se carga de forma aislada en el agente de Dameng y no requiere el complemento JDBC genérico.", damengCustomDriverHint: "Seleccione un JAR JDBC de Dameng de una fuente con licencia. El controlador se carga de forma aislada en el agente de Dameng y no requiere el complemento JDBC genérico.",
damengCustomDriverRequired: "Seleccione un JAR del controlador JDBC de Dameng.", damengCustomDriverRequired: "Seleccione un JAR del controlador JDBC de Dameng.",
sundbCustomDriverHint:
"El agente de SunDB ya incluye el controlador JDBC del fabricante, por lo que no se necesita ningún JAR (clase de controlador csii.sundb.jdbc.SundbDriver). Indique aquí un JAR solo para cargar un controlador del fabricante más reciente; el controlador personalizado se carga de forma aislada dentro del agente.",
zookeeperClusterInputHint: "El clúster ZooKeeper puede completarse con todos los nodos en la URL superior (por ejemplo, zookeeper://zk-1:2181,zk-2:2181/app), o en el Connect String a continuación.", zookeeperClusterInputHint: "El clúster ZooKeeper puede completarse con todos los nodos en la URL superior (por ejemplo, zookeeper://zk-1:2181,zk-2:2181/app), o en el Connect String a continuación.",
zookeeperAuthMethod: "Método de autenticación", zookeeperAuthMethod: "Método de autenticación",
zookeeperAuthDigest: "Digest (predeterminado)", zookeeperAuthDigest: "Digest (predeterminado)",
+2
View File
@@ -1595,6 +1595,8 @@ export default withEnglishFallback({
damengDriverModeHint: "Usa il driver integrato per DM8. Per DM6 o un'altra versione compatibile, seleziona il relativo JAR JDBC ufficiale.", damengDriverModeHint: "Usa il driver integrato per DM8. Per DM6 o un'altra versione compatibile, seleziona il relativo JAR JDBC ufficiale.",
damengCustomDriverHint: "Seleziona un JAR JDBC Dameng da una fonte autorizzata. Il driver viene caricato in modo isolato nell'agente Dameng e non richiede il plugin JDBC generico.", damengCustomDriverHint: "Seleziona un JAR JDBC Dameng da una fonte autorizzata. Il driver viene caricato in modo isolato nell'agente Dameng e non richiede il plugin JDBC generico.",
damengCustomDriverRequired: "Seleziona un JAR del driver JDBC Dameng.", damengCustomDriverRequired: "Seleziona un JAR del driver JDBC Dameng.",
sundbCustomDriverHint:
"L'agente SunDB include il driver JDBC del fornitore, quindi non serve alcun JAR (classe driver csii.sundb.jdbc.SundbDriver). Indica qui un JAR solo per caricare un driver del fornitore più recente; il driver personalizzato viene caricato in modo isolato all'interno dell'agente.",
zookeeperClusterInputHint: "Il cluster ZooKeeper può essere specificato inserendo tutti i nodi nell'URL superiore (ad esempio zookeeper://zk-1:2181,zk-2:2181/app), oppure nella stringa di connessione sottostante.", zookeeperClusterInputHint: "Il cluster ZooKeeper può essere specificato inserendo tutti i nodi nell'URL superiore (ad esempio zookeeper://zk-1:2181,zk-2:2181/app), oppure nella stringa di connessione sottostante.",
zookeeperAuthMethod: "Metodo di autenticazione", zookeeperAuthMethod: "Metodo di autenticazione",
zookeeperAuthDigest: "Digest (predefinito)", zookeeperAuthDigest: "Digest (predefinito)",
+2
View File
@@ -1595,6 +1595,8 @@ export default withEnglishFallback({
damengDriverModeHint: "DM8 では内蔵ドライバーを使用します。DM6 またはその他の互換バージョンでは、対応する公式 JDBC JAR を選択してください。", damengDriverModeHint: "DM8 では内蔵ドライバーを使用します。DM6 またはその他の互換バージョンでは、対応する公式 JDBC JAR を選択してください。",
damengCustomDriverHint: "正規の提供元から入手した Dameng JDBC JAR を選択してください。カスタムドライバーは Dameng エージェント内で分離して読み込まれ、汎用 JDBC プラグインは不要です。", damengCustomDriverHint: "正規の提供元から入手した Dameng JDBC JAR を選択してください。カスタムドライバーは Dameng エージェント内で分離して読み込まれ、汎用 JDBC プラグインは不要です。",
damengCustomDriverRequired: "Dameng JDBC ドライバー JAR を選択してください。", damengCustomDriverRequired: "Dameng JDBC ドライバー JAR を選択してください。",
sundbCustomDriverHint:
"SunDB エージェントにはベンダー製 JDBC ドライバーが同梱されているため、JAR の指定は不要です(ドライバークラス csii.sundb.jdbc.SundbDriver)。より新しいベンダー製ドライバーを読み込む場合にのみ、ここで JAR を指定してください。カスタムドライバーはエージェント内で分離して読み込まれます。",
localInfilePathHint: "LOAD DATA LOCAL INFILE を使用する場合、localInfilePath=/絶対パス/file.csv で各ファイルを明示的に許可してください。複数のファイルがある場合はこのパラメータを繰り返します。", localInfilePathHint: "LOAD DATA LOCAL INFILE を使用する場合、localInfilePath=/絶対パス/file.csv で各ファイルを明示的に許可してください。複数のファイルがある場合はこのパラメータを繰り返します。",
hiveAuthMode: "認証", hiveAuthMode: "認証",
hiveAuthNone: "なし", hiveAuthNone: "なし",
+1
View File
@@ -970,6 +970,7 @@ export default withEnglishFallback({
damengDriverModeHint: "DM8은 내장 드라이버를 사용합니다. DM6 또는 다른 호환 버전은 해당 공식 JDBC JAR을 선택하세요.", damengDriverModeHint: "DM8은 내장 드라이버를 사용합니다. DM6 또는 다른 호환 버전은 해당 공식 JDBC JAR을 선택하세요.",
damengCustomDriverHint: "정식 출처의 Dameng JDBC JAR을 선택하세요. 사용자 지정 드라이버는 Dameng 에이전트에서 격리되어 로드되며 일반 JDBC 플러그인이 필요하지 않습니다.", damengCustomDriverHint: "정식 출처의 Dameng JDBC JAR을 선택하세요. 사용자 지정 드라이버는 Dameng 에이전트에서 격리되어 로드되며 일반 JDBC 플러그인이 필요하지 않습니다.",
damengCustomDriverRequired: "Dameng JDBC 드라이버 JAR을 선택하세요.", damengCustomDriverRequired: "Dameng JDBC 드라이버 JAR을 선택하세요.",
sundbCustomDriverHint: "SunDB 에이전트에는 벤더 JDBC 드라이버가 포함되어 있으므로 JAR을 지정할 필요가 없습니다(드라이버 클래스 csii.sundb.jdbc.SundbDriver). 더 새로운 벤더 드라이버를 로드할 때만 여기에서 JAR을 지정하세요. 사용자 지정 드라이버는 에이전트 내에서 격리되어 로드됩니다.",
redisTlsInsecure: "인증서 검증 건너뛰기", redisTlsInsecure: "인증서 검증 건너뛰기",
redisTlsInsecureHint: "redis-cli --tls --insecure과 동일하며, 자체 서명 인증서나 사설 CA용입니다.", redisTlsInsecureHint: "redis-cli --tls --insecure과 동일하며, 자체 서명 인증서나 사설 CA용입니다.",
mysqlTlsMode: "TLS 모드", mysqlTlsMode: "TLS 모드",
+2
View File
@@ -1596,6 +1596,8 @@ export default withEnglishFallback({
damengDriverModeHint: "Use o driver integrado para DM8. Para DM6 ou outra versão compatível, selecione o JAR JDBC oficial correspondente.", damengDriverModeHint: "Use o driver integrado para DM8. Para DM6 ou outra versão compatível, selecione o JAR JDBC oficial correspondente.",
damengCustomDriverHint: "Selecione um JAR JDBC do Dameng de uma fonte licenciada. O driver é carregado de forma isolada no agente Dameng e não requer o plugin JDBC genérico.", damengCustomDriverHint: "Selecione um JAR JDBC do Dameng de uma fonte licenciada. O driver é carregado de forma isolada no agente Dameng e não requer o plugin JDBC genérico.",
damengCustomDriverRequired: "Selecione um JAR do driver JDBC do Dameng.", damengCustomDriverRequired: "Selecione um JAR do driver JDBC do Dameng.",
sundbCustomDriverHint:
"O agente SunDB já inclui o driver JDBC do fabricante, portanto nenhum JAR é necessário (classe do driver csii.sundb.jdbc.SundbDriver). Indique um JAR aqui apenas para carregar um driver do fabricante mais recente; o driver personalizado é carregado de forma isolada dentro do agente.",
zookeeperClusterInputHint: "O cluster ZooKeeper pode ser preenchido com todos os nós na URL acima (por exemplo, zookeeper://zk-1:2181,zk-2:2181/app), ou também na Connect String abaixo.", zookeeperClusterInputHint: "O cluster ZooKeeper pode ser preenchido com todos os nós na URL acima (por exemplo, zookeeper://zk-1:2181,zk-2:2181/app), ou também na Connect String abaixo.",
zookeeperAuthMethod: "Método de autenticação", zookeeperAuthMethod: "Método de autenticação",
zookeeperAuthDigest: "Digest (padrão)", zookeeperAuthDigest: "Digest (padrão)",
+2
View File
@@ -927,6 +927,8 @@ export default withEnglishFallback({
damengDriverModeHint: "Используйте встроенный драйвер для DM8. Для DM6 или другой совместимой версии выберите её официальный JDBC JAR.", damengDriverModeHint: "Используйте встроенный драйвер для DM8. Для DM6 или другой совместимой версии выберите её официальный JDBC JAR.",
damengCustomDriverHint: "Выберите Dameng JDBC JAR из лицензированного источника. Пользовательский драйвер изолирован внутри агента Dameng и не требует универсального плагина JDBC.", damengCustomDriverHint: "Выберите Dameng JDBC JAR из лицензированного источника. Пользовательский драйвер изолирован внутри агента Dameng и не требует универсального плагина JDBC.",
damengCustomDriverRequired: "Выберите JAR-файл драйвера Dameng JDBC.", damengCustomDriverRequired: "Выберите JAR-файл драйвера Dameng JDBC.",
sundbCustomDriverHint:
"Агент SunDB уже включает драйвер JDBC от производителя, поэтому JAR указывать не нужно (класс драйвера csii.sundb.jdbc.SundbDriver). Укажите JAR здесь, только чтобы загрузить более новую версию драйвера производителя; пользовательский драйвер загружается изолированно внутри агента.",
redisTlsInsecure: "Пропускать проверку сертификата", redisTlsInsecure: "Пропускать проверку сертификата",
redisTlsInsecureHint: "Эквивалентно redis-cli --tls --insecure, для самоподписанных сертификатов или частных CA.", redisTlsInsecureHint: "Эквивалентно redis-cli --tls --insecure, для самоподписанных сертификатов или частных CA.",
mysqlTlsMode: "Режим TLS", mysqlTlsMode: "Режим TLS",
+1
View File
@@ -748,6 +748,7 @@ export default withEnglishFallback({
damengDriverModeHint: "DM8 için pakete gömülü sürücüyü kullanın. DM6 veya başka bir uyumlu sürüm için resmî JDBC JAR dosyasını seçin.", damengDriverModeHint: "DM8 için pakete gömülü sürücüyü kullanın. DM6 veya başka bir uyumlu sürüm için resmî JDBC JAR dosyasını seçin.",
damengCustomDriverHint: "Lisanslı bir kaynaktan Dameng JDBC JAR dosyası seçin. Özel sürücü Dameng agent'ı içinde yalıtılır ve genel JDBC eklentisini gerektirmez.", damengCustomDriverHint: "Lisanslı bir kaynaktan Dameng JDBC JAR dosyası seçin. Özel sürücü Dameng agent'ı içinde yalıtılır ve genel JDBC eklentisini gerektirmez.",
damengCustomDriverRequired: "Bir Dameng JDBC sürücü JAR dosyası seçin.", damengCustomDriverRequired: "Bir Dameng JDBC sürücü JAR dosyası seçin.",
sundbCustomDriverHint: "SunDB agent'i üretici JDBC sürücüsünü içerir, bu yüzden JAR gerekmez (sürücü sınıfı csii.sundb.jdbc.SundbDriver). Yalnızca daha yeni bir üretici sürücüsü yüklemek için burada JAR belirtin; özel sürücü agent içinde yalıtılarak yüklenir.",
redisTlsInsecure: "Sertifika doğrulamasını atla", redisTlsInsecure: "Sertifika doğrulamasını atla",
redisTlsInsecureHint: "redis-cli --tls --insecure ile eşdeğerdir; kendinden imzalı sertifikalar veya özel CA'lar içindir.", redisTlsInsecureHint: "redis-cli --tls --insecure ile eşdeğerdir; kendinden imzalı sertifikalar veya özel CA'lar içindir.",
mysqlTlsMode: "TLS Modu", mysqlTlsMode: "TLS Modu",
+1
View File
@@ -957,6 +957,7 @@ export default withEnglishFallback({
damengDriverModeHint: "DM8 使用内置驱动;DM6 或其他兼容版本请选择对应的官方 JDBC JAR。", damengDriverModeHint: "DM8 使用内置驱动;DM6 或其他兼容版本请选择对应的官方 JDBC JAR。",
damengCustomDriverHint: "请选择合法来源的达梦 JDBC JAR。自定义驱动在达梦 Agent 内隔离加载,无需安装通用 JDBC 插件。", damengCustomDriverHint: "请选择合法来源的达梦 JDBC JAR。自定义驱动在达梦 Agent 内隔离加载,无需安装通用 JDBC 插件。",
damengCustomDriverRequired: "请选择达梦 JDBC 驱动 JAR。", damengCustomDriverRequired: "请选择达梦 JDBC 驱动 JAR。",
sundbCustomDriverHint: "科蓝 SUNDB Agent 已内置厂商 JDBC 驱动,无需指定 JAR(驱动类 csii.sundb.jdbc.SundbDriver)。仅在需要加载更新版厂商驱动时在此指定 JAR;自定义驱动在 Agent 内隔离加载。",
redisTlsInsecure: "跳过证书验证", redisTlsInsecure: "跳过证书验证",
redisTlsInsecureHint: "等价于 redis-cli --tls --insecure,适用于自签名证书或私有 CA。", redisTlsInsecureHint: "等价于 redis-cli --tls --insecure,适用于自签名证书或私有 CA。",
mysqlTlsMode: "TLS 模式", mysqlTlsMode: "TLS 模式",
+1
View File
@@ -1606,6 +1606,7 @@ export default withEnglishFallback({
damengDriverModeHint: "DM8 使用內建驅動;DM6 或其他相容版本請選擇對應的官方 JDBC JAR。", damengDriverModeHint: "DM8 使用內建驅動;DM6 或其他相容版本請選擇對應的官方 JDBC JAR。",
damengCustomDriverHint: "請選擇合法來源的達夢 JDBC JAR。自訂驅動會在達夢 Agent 內隔離載入,不需要安裝通用 JDBC 外掛。", damengCustomDriverHint: "請選擇合法來源的達夢 JDBC JAR。自訂驅動會在達夢 Agent 內隔離載入,不需要安裝通用 JDBC 外掛。",
damengCustomDriverRequired: "請選擇達夢 JDBC 驅動 JAR。", damengCustomDriverRequired: "請選擇達夢 JDBC 驅動 JAR。",
sundbCustomDriverHint: "科藍 SUNDB Agent 已內建廠商 JDBC 驅動,無需指定 JAR(驅動類別 csii.sundb.jdbc.SundbDriver)。僅在需要載入更新版廠商驅動時在此指定 JAR;自訂驅動會在 Agent 內隔離載入。",
zookeeperClusterInputHint: "ZooKeeper 叢集可在上方 URL 中填寫全部節點(例如 zookeeper://zk-1:2181,zk-2:2181/app),也可在下方 Connect String 中填寫。", zookeeperClusterInputHint: "ZooKeeper 叢集可在上方 URL 中填寫全部節點(例如 zookeeper://zk-1:2181,zk-2:2181/app),也可在下方 Connect String 中填寫。",
zookeeperAuthMethod: "認證方式", zookeeperAuthMethod: "認證方式",
zookeeperAuthDigest: "Digest(預設)", zookeeperAuthDigest: "Digest(預設)",
@@ -0,0 +1,14 @@
import { describe, expect, it } from "vitest";
import { SUNDB_DEFAULT_JDBC_DRIVER_CLASS, sundbJdbcDriverClass } from "@/lib/database/sundbDriverOptions";
describe("sundb driver options", () => {
it("defaults the driver class to the vendor class bundled inside the Agent", () => {
expect(SUNDB_DEFAULT_JDBC_DRIVER_CLASS).toBe("csii.sundb.jdbc.SundbDriver");
expect(sundbJdbcDriverClass({})).toBe("csii.sundb.jdbc.SundbDriver");
expect(sundbJdbcDriverClass({ jdbc_driver_class: " " })).toBe("csii.sundb.jdbc.SundbDriver");
});
it("keeps an explicit driver class", () => {
expect(sundbJdbcDriverClass({ jdbc_driver_class: " com.example.SundbDriver " })).toBe("com.example.SundbDriver");
});
});
@@ -0,0 +1,16 @@
import type { ConnectionConfig } from "@/types/database";
/**
* The SunDB (科蓝 SUNDB) Agent bundles the vendor JDBC driver (vendored under
* `agents/drivers/sundb/libs/`), so an empty `jdbc_driver_paths` resolves the
* driver class on the Agent's own classpath. Callers may still point a
* connection at a newer vendor JAR, which the Agent then loads in an isolated
* URLClassLoader instead.
*/
export const SUNDB_DEFAULT_JDBC_DRIVER_CLASS = "csii.sundb.jdbc.SundbDriver";
type SundbDriverConfig = Partial<Pick<ConnectionConfig, "jdbc_driver_class">>;
export function sundbJdbcDriverClass(config: SundbDriverConfig): string {
return config.jdbc_driver_class?.trim() || SUNDB_DEFAULT_JDBC_DRIVER_CLASS;
}