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。

992 B
Raw Blame
export function driverStoreUpdateBadgeCount(autoUpdateDrivers: boolean, autoUpdateJdbc: boolean, driverUpdateCount: number, jdbcUpdateAvailable: boolean): number {
  return (autoUpdateDrivers ? 0 : driverUpdateCount) + (!autoUpdateJdbc && jdbcUpdateAvailable ? 1 : 0);
}

export function showMcpUpdateBadge(autoUpdateMcp: boolean, mcpUpdateAvailable: boolean): boolean {
  return !autoUpdateMcp && mcpUpdateAvailable;
}

export function showToolbarUpdateAction(options: { appUpdateAvailable: boolean; driverUpdateCount: number; jdbcUpdateAvailable: boolean; mcpUpdateAvailable: boolean; pluginUpdateCount: number; componentUpdatesRunning: boolean }): boolean {
  // Installation refreshes before replacing components, so discovery can report pending entries mid-operation.
  if (options.componentUpdatesRunning) return false;
  return options.appUpdateAvailable || options.driverUpdateCount > 0 || options.jdbcUpdateAvailable || options.mcpUpdateAvailable || options.pluginUpdateCount > 0;
}