Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

fix(lint): clear warnings introduced by merged features

t8y24e04c557d6d2
diff --git a/apps/desktop/src/components/objects/ObjectBrowser.vue b/apps/desktop/src/components/objects/ObjectBrowser.vue
index fde85ffc20..aaba0b263a 100644
--- a/apps/desktop/src/components/objects/ObjectBrowser.vue
+++ b/apps/desktop/src/components/objects/ObjectBrowser.vue
@@ -2984,9 +2984,9 @@ async function confirmPasteTableImpl() {
}
successCount++;
if (preparedClones.has(entry)) completedCloneTargets.push(`${schema}.${targetName}`);
- } catch (e: any) {
+ } catch (caught: any) {
if (context.databaseType === "oceanbase-oracle" && preparedClones.size) {
- if (completedClone && !(e instanceof OceanbaseTableCloneError)) e = oceanbaseCloneDataPreparationError(completedClone, e);
+ const e = completedClone && !(caught instanceof OceanbaseTableCloneError) ? oceanbaseCloneDataPreparationError(completedClone, caught) : caught;
const refreshed = await Promise.allSettled([reloadTableCopyContext(context), connectionStore.refreshObjectListTreeNode(context.connection.id, context.database, schema)]);
cloneFailure = {
error: e,
diff --git a/apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue b/apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue
index 953a5ac85d..d108f5d62d 100644
--- a/apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue
+++ b/apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue
@@ -5008,9 +5008,9 @@ async function confirmPasteTableImpl() {
}
successCount++;
if (preparedClones.has(entry)) completedCloneTargets.push(`${schema}.${targetName}`);
- } catch (e: any) {
+ } catch (caught: any) {
if (preparedClones.has(entry)) {
- if (completedClone && !(e instanceof OceanbaseTableCloneError)) e = oceanbaseCloneDataPreparationError(completedClone, e);
+ const e = completedClone && !(caught instanceof OceanbaseTableCloneError) ? oceanbaseCloneDataPreparationError(completedClone, caught) : caught;
queueRefreshTarget({ ...entry, schema: e instanceof OceanbaseTableCloneError ? e.targetSchema : schema });
cloneFailure = {
error: e,
diff --git a/apps/desktop/src/lib/__tests__/database/DatabaseUserAdmin.component.spec.ts b/apps/desktop/src/lib/__tests__/database/DatabaseUserAdmin.component.spec.ts
index d6d6dfbdbc..a72cf4460f 100644
--- a/apps/desktop/src/lib/__tests__/database/DatabaseUserAdmin.component.spec.ts
+++ b/apps/desktop/src/lib/__tests__/database/DatabaseUserAdmin.component.spec.ts
@@ -244,7 +244,7 @@ function mountWithReactiveConnection(initialConnection: ConnectionConfig) {
document.body.append(root);
app = createApp(Harness);
app.mount(root);
- updateConnection = (app._instance?.exposed as { update: (connection: ConnectionConfig) => void }).update;
+ updateConnection = (app._instance?.exposed ?? ({ update: () => undefined } as unknown as { update: (connection: ConnectionConfig) => void })).update;
}
afterEach(() => {
diff --git a/apps/desktop/src/lib/table/starrocksAlterStatus.ts b/apps/desktop/src/lib/table/starrocksAlterStatus.ts
index 0cc734f8f0..0a7570683a 100644
--- a/apps/desktop/src/lib/table/starrocksAlterStatus.ts
+++ b/apps/desktop/src/lib/table/starrocksAlterStatus.ts
@@ -17,7 +17,8 @@ export function isStarRocksAlterJobActive(job: StarRocksAlterJob): boolean {
return !terminalStates.has(job.state);
}
export function starRocksAlterStatusSql(kind: StarRocksAlterKind, table: string): string {
- if (!STARROCKS_ALTER_KINDS.includes(kind) || !table || /[\\\x00-\x1f]/.test(table)) throw new Error("Unsupported table name for ALTER status query");
+ // \u0000-style escapes keep the control-character class explicit for oxlint's no-control-regex.
+ if (!STARROCKS_ALTER_KINDS.includes(kind) || !table || /[\\\u0000-\u001f]/.test(table)) throw new Error("Unsupported table name for ALTER status query");
return `SHOW ALTER TABLE ${kind} WHERE TableName = '${table.replaceAll("'", "''")}' ORDER BY CreateTime DESC LIMIT 5;`;
}
export function parseStarRocksAlterJobs(kind: StarRocksAlterKind, result: Pick<QueryResult, "columns" | "rows">): StarRocksAlterJob[] {