mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-05-24 18:00:04 +08:00
* feat(mongodb-driver,connection-tree): 支持 MongoDB v1/v2 切换并新增复制连接 * fix(mongodb-query): 修复 MongoDB 筛选不生效并兼容 shell 语法执行 refs #153 * fix(query-editor): 修复 SQLServer 自动补全回车重复 dbo 前缀 refs #159 * fix(sqlserver-table-designer): 修复设计表读取列时错误使用 schema 作为数据库名 refs #156 * feat(shortcuts): 增加快捷键设置并支持 SQL 执行/侧边栏搜索 refs #158 * fix(sidebar-search): 优化范围搜索匹配与交互 refs #158 * fix(filter,connection-recovery): 保持筛选状态并修复连接失效卡死 refs #165 同步修复连接失效后侧栏持续转圈、断开后无法恢复的问题 * feat(table-designer): 统一设计表界面风格并优化字段新增交互 - 统一设计表页面与数据面板的视觉风格,覆盖工具栏、Tabs、表格与编辑区域 - 移除默认硬边框,改为透明背景与细分隔线,提升整体观感一致性 - 添加字段后自动滚动到新行并高亮,且自动聚焦输入框 - 新增" 在选中字段后添加\,支持按选中字段位置插入字段 * feat(data-grid-filter): 筛选字段支持快捷搜索 - 在筛选条件字段下拉启用可搜索(showSearch) - 支持字段名大小写不敏感模糊匹配 - 表字段较多时可快速定位目标字段,减少下拉查找耗时 refs #171 * fix(db-ssl): 支持多数据源 SSL/TLS 连接并补齐达梦证书配置 refs #167 * fix(sidebar): 修复数据库加载时 null.map 导致表加载失败 * fix(query-editor): 合并运行按钮并保留 SQL 停止执行入口
174 lines
3.5 KiB
TypeScript
174 lines
3.5 KiB
TypeScript
export interface SSHConfig {
|
|
host: string;
|
|
port: number;
|
|
user: string;
|
|
password?: string;
|
|
keyPath?: string;
|
|
}
|
|
|
|
export interface ProxyConfig {
|
|
type: 'socks5' | 'http';
|
|
host: string;
|
|
port: number;
|
|
user?: string;
|
|
password?: string;
|
|
}
|
|
|
|
export interface ConnectionConfig {
|
|
type: string;
|
|
host: string;
|
|
port: number;
|
|
user: string;
|
|
password?: string;
|
|
savePassword?: boolean;
|
|
database?: string;
|
|
useSSL?: boolean;
|
|
sslMode?: 'preferred' | 'required' | 'skip-verify' | 'disable';
|
|
sslCertPath?: string;
|
|
sslKeyPath?: string;
|
|
useSSH?: boolean;
|
|
ssh?: SSHConfig;
|
|
useProxy?: boolean;
|
|
proxy?: ProxyConfig;
|
|
driver?: string;
|
|
dsn?: string;
|
|
timeout?: number;
|
|
redisDB?: number; // Redis database index (0-15)
|
|
uri?: string; // Connection URI for copy/paste
|
|
hosts?: string[]; // Multi-host addresses: host:port
|
|
topology?: 'single' | 'replica' | 'cluster';
|
|
mysqlReplicaUser?: string;
|
|
mysqlReplicaPassword?: string;
|
|
replicaSet?: string;
|
|
authSource?: string;
|
|
readPreference?: string;
|
|
mongoSrv?: boolean;
|
|
mongoAuthMechanism?: string;
|
|
mongoReplicaUser?: string;
|
|
mongoReplicaPassword?: string;
|
|
}
|
|
|
|
export interface MongoMemberInfo {
|
|
host: string;
|
|
role: string;
|
|
state: string;
|
|
stateCode?: number;
|
|
healthy: boolean;
|
|
isSelf?: boolean;
|
|
}
|
|
|
|
export interface SavedConnection {
|
|
id: string;
|
|
name: string;
|
|
config: ConnectionConfig;
|
|
includeDatabases?: string[];
|
|
includeRedisDatabases?: number[]; // Redis databases to show (0-15)
|
|
}
|
|
|
|
export interface ConnectionTag {
|
|
id: string;
|
|
name: string;
|
|
connectionIds: string[];
|
|
}
|
|
|
|
export interface ColumnDefinition {
|
|
name: string;
|
|
type: string;
|
|
nullable: string;
|
|
key: string;
|
|
default?: string;
|
|
extra: string;
|
|
comment: string;
|
|
}
|
|
|
|
export interface IndexDefinition {
|
|
name: string;
|
|
columnName: string;
|
|
nonUnique: number;
|
|
seqInIndex: number;
|
|
indexType: string;
|
|
}
|
|
|
|
export interface ForeignKeyDefinition {
|
|
name: string;
|
|
columnName: string;
|
|
refTableName: string;
|
|
refColumnName: string;
|
|
constraintName: string;
|
|
}
|
|
|
|
export interface TriggerDefinition {
|
|
name: string;
|
|
timing: string;
|
|
event: string;
|
|
statement: string;
|
|
}
|
|
|
|
export interface TabData {
|
|
id: string;
|
|
title: string;
|
|
type: 'query' | 'table' | 'design' | 'redis-keys' | 'redis-command' | 'trigger' | 'view-def' | 'routine-def';
|
|
connectionId: string;
|
|
dbName?: string;
|
|
tableName?: string;
|
|
query?: string;
|
|
initialTab?: string;
|
|
readOnly?: boolean;
|
|
redisDB?: number; // Redis database index for redis tabs
|
|
triggerName?: string; // Trigger name for trigger tabs
|
|
viewName?: string; // View name for view definition tabs
|
|
routineName?: string; // Routine name for function/procedure definition tabs
|
|
routineType?: string; // 'FUNCTION' or 'PROCEDURE'
|
|
}
|
|
|
|
export interface DatabaseNode {
|
|
title: string;
|
|
key: string;
|
|
isLeaf?: boolean;
|
|
children?: DatabaseNode[];
|
|
icon?: any;
|
|
}
|
|
|
|
export interface SavedQuery {
|
|
id: string;
|
|
name: string;
|
|
sql: string;
|
|
connectionId: string;
|
|
dbName: string;
|
|
createdAt: number;
|
|
}
|
|
|
|
// Redis types
|
|
export interface RedisKeyInfo {
|
|
key: string;
|
|
type: string;
|
|
ttl: number;
|
|
}
|
|
|
|
export interface RedisScanResult {
|
|
keys: RedisKeyInfo[];
|
|
cursor: string;
|
|
}
|
|
|
|
export interface RedisValue {
|
|
type: 'string' | 'hash' | 'list' | 'set' | 'zset' | 'stream';
|
|
ttl: number;
|
|
value: any;
|
|
length: number;
|
|
}
|
|
|
|
export interface RedisDBInfo {
|
|
index: number;
|
|
keys: number;
|
|
}
|
|
|
|
export interface ZSetMember {
|
|
member: string;
|
|
score: number;
|
|
}
|
|
|
|
export interface StreamEntry {
|
|
id: string;
|
|
fields: Record<string, string>;
|
|
}
|