fdb2 1.0.40 → 1.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/public/.vite/manifest.json +109 -1
- package/dist/public/database-monitor.css +445 -0
- package/dist/public/database-monitor.js +605 -0
- package/dist/public/database.css +740 -0
- package/dist/public/database.js +555 -0
- package/dist/public/database2.js +344 -0
- package/dist/public/echarts.js +79307 -0
- package/dist/public/explorer.css +979 -329
- package/dist/public/explorer.js +3563 -34962
- package/dist/public/export.js +54831 -0
- package/dist/public/helpers.js +27 -0
- package/dist/public/index.js +303 -35
- package/dist/public/layout.css +98 -65
- package/dist/public/layout.js +58 -21
- package/dist/public/query-history.css +651 -0
- package/dist/public/query-history.js +526 -0
- package/dist/public/sql-query-editor.css +503 -0
- package/dist/public/sql-query-editor.js +638 -0
- package/dist/public/theme.js +82 -0
- package/dist/server/__tests__/import-normalize.test.ts +79 -0
- package/dist/server/__tests__/remote-proxy.test.ts +62 -0
- package/dist/server/core/schema/__tests__/ddl-emitter.test.ts +152 -0
- package/dist/server/core/schema/canonical.d.ts.map +1 -1
- package/dist/server/core/schema/canonical.js +4 -1
- package/dist/server/core/schema/canonical.js.map +1 -1
- package/dist/server/core/schema/canonical.ts +4 -1
- package/dist/server/core/schema/ddl-emitter.d.ts +3 -0
- package/dist/server/core/schema/ddl-emitter.d.ts.map +1 -1
- package/dist/server/core/schema/ddl-emitter.js +126 -12
- package/dist/server/core/schema/ddl-emitter.js.map +1 -1
- package/dist/server/core/schema/ddl-emitter.ts +137 -11
- package/dist/server/index.d.ts +20 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +292 -19
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.ts +305 -21
- package/dist/server/service/database/cockroachdb.service.js +1 -1
- package/dist/server/service/database/cockroachdb.service.ts +1 -1
- package/dist/server/service/database/database.service.d.ts +22 -6
- package/dist/server/service/database/database.service.d.ts.map +1 -1
- package/dist/server/service/database/database.service.js +257 -54
- package/dist/server/service/database/database.service.js.map +1 -1
- package/dist/server/service/database/database.service.ts +265 -64
- package/dist/server/service/database/mongodb.service.d.ts +1 -1
- package/dist/server/service/database/mongodb.service.d.ts.map +1 -1
- package/dist/server/service/database/mongodb.service.js +18 -5
- package/dist/server/service/database/mongodb.service.js.map +1 -1
- package/dist/server/service/database/mongodb.service.ts +18 -5
- package/dist/server/service/database/mssql.service.js +4 -4
- package/dist/server/service/database/mssql.service.js.map +1 -1
- package/dist/server/service/database/mssql.service.ts +4 -4
- package/dist/server/service/database/oracle.service.d.ts +5 -1
- package/dist/server/service/database/oracle.service.d.ts.map +1 -1
- package/dist/server/service/database/oracle.service.js +23 -34
- package/dist/server/service/database/oracle.service.js.map +1 -1
- package/dist/server/service/database/oracle.service.ts +24 -44
- package/dist/server/service/database/sap.service.d.ts +8 -0
- package/dist/server/service/database/sap.service.d.ts.map +1 -1
- package/dist/server/service/database/sap.service.js +28 -0
- package/dist/server/service/database/sap.service.js.map +1 -1
- package/dist/server/service/database/sap.service.ts +29 -0
- package/dist/server/service/database/sqlite.service.d.ts.map +1 -1
- package/dist/server/service/database/sqlite.service.js +5 -2
- package/dist/server/service/database/sqlite.service.js.map +1 -1
- package/dist/server/service/database/sqlite.service.ts +5 -2
- package/package.json +1 -1
- package/public/fdb2.png +0 -0
package/dist/server/index.ts
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import * as http from "node:http";
|
|
2
2
|
import * as https from "node:https";
|
|
3
|
+
import * as fs from "node:fs";
|
|
3
4
|
import { ConnectionService } from './service/connection.service';
|
|
4
5
|
import { DatabaseService } from './service/database/database.service';
|
|
5
6
|
import { dataModelOf } from './core/dialect';
|
|
7
|
+
import { getDataPath, ensureDataDir } from './utils/data-dir';
|
|
6
8
|
|
|
7
9
|
// 远程代理相关常量
|
|
8
10
|
const REMOTE_ID_SEP = '::';
|
|
9
11
|
const REMOTE_TOKEN_HEADER = 'x-db-tool-token';
|
|
10
|
-
//
|
|
12
|
+
// 代理请求标记:旧版单行兼容——收到该标记的 getConnections 只返回本服务本地连接。
|
|
13
|
+
// 新版多级链路改用 x-db-tool-proxy-chain 记录经过的 URL,既能递归合并又能防环。
|
|
11
14
|
const REMOTE_PROXY_HEADER = 'x-db-tool-proxy';
|
|
15
|
+
const REMOTE_CHAIN_HEADER = 'x-db-tool-proxy-chain';
|
|
16
|
+
const MAX_PROXY_HOPS = 5;
|
|
12
17
|
|
|
13
18
|
// 永不转发的路由:只作用于本地连接配置(无远程对应物或需要本地语义)
|
|
14
19
|
const LOCAL_ONLY_ROUTES = new Set<string>([
|
|
@@ -32,12 +37,33 @@ function isRemoteConnection(conn: any): boolean {
|
|
|
32
37
|
return !!conn && conn.type === 'remote';
|
|
33
38
|
}
|
|
34
39
|
|
|
40
|
+
/** 深拷贝连接 options,并移除不应下发的远程访问令牌(混合版本兼容) */
|
|
41
|
+
function cloneOptionsWithoutRemoteToken(options: any): any {
|
|
42
|
+
if (!options || typeof options !== 'object') return options;
|
|
43
|
+
let cloned: any;
|
|
44
|
+
try {
|
|
45
|
+
cloned = JSON.parse(JSON.stringify(options));
|
|
46
|
+
} catch {
|
|
47
|
+
cloned = Array.isArray(options) ? [...options] : { ...options };
|
|
48
|
+
}
|
|
49
|
+
if (cloned && typeof cloned === 'object' && !Array.isArray(cloned)) {
|
|
50
|
+
delete cloned.remoteToken;
|
|
51
|
+
}
|
|
52
|
+
return cloned;
|
|
53
|
+
}
|
|
54
|
+
|
|
35
55
|
/** 从请求中取出被操作连接的 id(body 或路径段) */
|
|
36
|
-
function extractConnId(pathname: string, body: any): string | undefined {
|
|
56
|
+
export function extractConnId(pathname: string, body: any): string | undefined {
|
|
37
57
|
if (pathname.startsWith('/api/database/truncateTable/') || pathname.startsWith('/api/database/dropTable/')) {
|
|
38
58
|
const parts = pathname.split('/').filter(Boolean);
|
|
39
59
|
return parts[3];
|
|
40
60
|
}
|
|
61
|
+
// health 路径允许 body 为空:复合 id 必须在路径段中可读;有 body.id 时仍保持旧优先级。
|
|
62
|
+
if (pathname.startsWith('/api/database/health/') && body && typeof body.id === 'string') return body.id;
|
|
63
|
+
if (pathname.startsWith('/api/database/health/')) {
|
|
64
|
+
const parts = pathname.split('/').filter(Boolean);
|
|
65
|
+
return parts[3];
|
|
66
|
+
}
|
|
41
67
|
if (body && typeof body.id === 'string') return body.id;
|
|
42
68
|
return undefined;
|
|
43
69
|
}
|
|
@@ -46,7 +72,7 @@ function extractConnId(pathname: string, body: any): string | undefined {
|
|
|
46
72
|
* 拆分复合 id:proxyId::remoteConnId。
|
|
47
73
|
* remoteConnId 自身可能仍是复合 id(多级代理),必须保留剩余部分,不能用 split 截断。
|
|
48
74
|
*/
|
|
49
|
-
function splitProxyId(connId: string): { proxyId: string; remoteConnId: string } | null {
|
|
75
|
+
export function splitProxyId(connId: string): { proxyId: string; remoteConnId: string } | null {
|
|
50
76
|
const idx = connId.indexOf(REMOTE_ID_SEP);
|
|
51
77
|
if (idx <= 0) return null;
|
|
52
78
|
return {
|
|
@@ -170,18 +196,51 @@ async function postRemote(
|
|
|
170
196
|
return await postRemoteByNodeHttp(url, body, headers, timeoutMs);
|
|
171
197
|
}
|
|
172
198
|
|
|
173
|
-
/**
|
|
174
|
-
function buildRemoteHeaders(
|
|
175
|
-
|
|
199
|
+
/** 构造带令牌与链路信息的请求头。proxyMarker=false 时允许对端递归合并自己的代理。 */
|
|
200
|
+
export function buildRemoteHeaders(
|
|
201
|
+
proxyConn: any,
|
|
202
|
+
opts: { proxyMarker?: boolean; chain?: string[] } = {}
|
|
203
|
+
): Record<string, string> {
|
|
204
|
+
const headers: Record<string, string> = {};
|
|
205
|
+
if (opts.proxyMarker !== false) headers[REMOTE_PROXY_HEADER] = '1';
|
|
206
|
+
const chain = opts.chain || [];
|
|
207
|
+
if (chain.length > 0) headers[REMOTE_CHAIN_HEADER] = chain.join(',');
|
|
176
208
|
const token = proxyConn?.options?.remoteToken;
|
|
177
209
|
if (token) headers[REMOTE_TOKEN_HEADER] = String(token);
|
|
178
210
|
return headers;
|
|
179
211
|
}
|
|
180
212
|
|
|
213
|
+
/** 纯判断:base 是否已出现在链路中(用于阻止代理互指导致的递归) */
|
|
214
|
+
export function hasProxyLoop(base: string, chain: string[]): boolean {
|
|
215
|
+
return !!base && chain.includes(base);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/** 纯判断:链路深度是否已达到 5 跳上限(当前 URL 尚未加入 chain) */
|
|
219
|
+
export function isProxyHopLimitReached(chain: string[]): boolean {
|
|
220
|
+
return chain.length >= MAX_PROXY_HOPS;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
function remoteBaseOf(proxyConn: any): string {
|
|
224
|
+
return String(proxyConn?.options?.remoteUrl || '').replace(/\/+$/, '');
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export function chainFromHeaders(headers?: any): string[] {
|
|
228
|
+
return String(headers?.[REMOTE_CHAIN_HEADER] || '').split(',').map((s) => s.trim()).filter(Boolean);
|
|
229
|
+
}
|
|
230
|
+
|
|
181
231
|
/** 把请求原样转发到远程 db_tool 服务端(自动解包远程响应,避免二次包装) */
|
|
182
|
-
async function proxyToRemote(
|
|
183
|
-
|
|
232
|
+
async function proxyToRemote(
|
|
233
|
+
proxyConn: any,
|
|
234
|
+
remoteConnId: string,
|
|
235
|
+
pathname: string,
|
|
236
|
+
body: any,
|
|
237
|
+
chain: string[] = []
|
|
238
|
+
): Promise<any> {
|
|
239
|
+
const base = remoteBaseOf(proxyConn);
|
|
184
240
|
if (!base) throw new Error('远程代理连接缺少 remoteUrl');
|
|
241
|
+
if (hasProxyLoop(base, chain)) throw new Error(`检测到代理环路:${base}`);
|
|
242
|
+
if (isProxyHopLimitReached(chain)) throw new Error(`代理链路超过 ${MAX_PROXY_HOPS} 跳,已中止以防环`);
|
|
243
|
+
const nextChain = [...chain, base];
|
|
185
244
|
let targetPath = pathname;
|
|
186
245
|
if (pathname.startsWith('/api/database/truncateTable/') || pathname.startsWith('/api/database/dropTable/')) {
|
|
187
246
|
const parts = pathname.split('/').filter(Boolean);
|
|
@@ -191,19 +250,37 @@ async function proxyToRemote(proxyConn: any, remoteConnId: string, pathname: str
|
|
|
191
250
|
targetPath = '/' + parts.join('/');
|
|
192
251
|
}
|
|
193
252
|
const targetBody = { ...body, id: remoteConnId };
|
|
194
|
-
const env = await postRemote(
|
|
253
|
+
const env = await postRemote(
|
|
254
|
+
`${base}${targetPath}`,
|
|
255
|
+
targetBody,
|
|
256
|
+
buildRemoteHeaders(proxyConn, { proxyMarker: false, chain: nextChain }),
|
|
257
|
+
60000
|
|
258
|
+
);
|
|
195
259
|
if (env && typeof env === 'object' && env.ret && env.ret !== 0) {
|
|
196
260
|
throw new Error(env.msg || '远程服务执行失败');
|
|
197
261
|
}
|
|
198
262
|
return env?.data;
|
|
199
263
|
}
|
|
200
264
|
|
|
201
|
-
/**
|
|
202
|
-
|
|
203
|
-
|
|
265
|
+
/**
|
|
266
|
+
* 拉取远程服务上的连接列表。不发送旧版 proxy 标记,因此远程端会递归合并它自己的代理;
|
|
267
|
+
* 通过 chain 记录已访问的 URL,detect 到环路或超过跳数上限时停止,避免无限递归。
|
|
268
|
+
*/
|
|
269
|
+
async function fetchRemoteConnections(
|
|
270
|
+
proxyConn: any,
|
|
271
|
+
chain: string[] = []
|
|
272
|
+
): Promise<{ list: any[]; error?: string }> {
|
|
273
|
+
const base = remoteBaseOf(proxyConn);
|
|
204
274
|
if (!base) return { list: [], error: '缺少 remoteUrl' };
|
|
275
|
+
if (hasProxyLoop(base, chain)) return { list: [], error: `检测到代理环路:${base}` };
|
|
276
|
+
if (isProxyHopLimitReached(chain)) return { list: [], error: `代理链路超过 ${MAX_PROXY_HOPS} 跳` };
|
|
205
277
|
try {
|
|
206
|
-
const env = await postRemote(
|
|
278
|
+
const env = await postRemote(
|
|
279
|
+
`${base}/api/database/getConnections`,
|
|
280
|
+
{},
|
|
281
|
+
buildRemoteHeaders(proxyConn, { proxyMarker: false, chain: [...chain, base] }),
|
|
282
|
+
10000
|
|
283
|
+
);
|
|
207
284
|
if (env && env.ret && env.ret !== 0) {
|
|
208
285
|
console.warn('[remote] 获取远程连接列表失败:', env.msg);
|
|
209
286
|
return { list: [], error: env.msg || '远程服务返回错误' };
|
|
@@ -215,12 +292,13 @@ async function fetchRemoteConnections(proxyConn: any): Promise<{ list: any[]; er
|
|
|
215
292
|
}
|
|
216
293
|
}
|
|
217
294
|
|
|
218
|
-
/** 网关模式:本地连接列表 = 本地连接 +
|
|
219
|
-
async function handleGetConnectionsWithProxy(): Promise<any[]> {
|
|
295
|
+
/** 网关模式:本地连接列表 = 本地连接 + 各级远程代理暴露的连接(支持 A→B→C 多级链路) */
|
|
296
|
+
async function handleGetConnectionsWithProxy(headers?: any): Promise<any[]> {
|
|
220
297
|
const locals = await connectionService.getAllConnections();
|
|
298
|
+
const chain = chainFromHeaders(headers);
|
|
221
299
|
// 并行拉取各远程服务,避免多个远程时串行等待
|
|
222
300
|
const remoteResults = await Promise.all(
|
|
223
|
-
locals.map(conn => (isRemoteConnection(conn) ? fetchRemoteConnections(conn) : Promise.resolve(null)))
|
|
301
|
+
locals.map(conn => (isRemoteConnection(conn) ? fetchRemoteConnections(conn, chain) : Promise.resolve(null)))
|
|
224
302
|
);
|
|
225
303
|
const result: any[] = [];
|
|
226
304
|
locals.forEach((conn, index) => {
|
|
@@ -232,15 +310,21 @@ async function handleGetConnectionsWithProxy(): Promise<any[]> {
|
|
|
232
310
|
// 代理配置本身保留(用于编辑/删除),标记 _isProxy
|
|
233
311
|
result.push({ ...conn, _isProxy: true, _remoteError: remote?.error });
|
|
234
312
|
for (const rc of remote?.list || []) {
|
|
235
|
-
|
|
313
|
+
// 代理配置本身(含 remoteUrl/token)不能作为可操作的数据库连接暴露;
|
|
314
|
+
// 旧版本可能只靠 type='remote' 标记,混合版本下两种标记都要过滤。
|
|
315
|
+
if (rc.type === 'remote' || rc._isProxy) continue;
|
|
236
316
|
const safe = { ...rc };
|
|
237
317
|
delete safe.password; // 不把远程库的密码下发到客户端
|
|
318
|
+
if (safe.options !== undefined) safe.options = cloneOptionsWithoutRemoteToken(safe.options);
|
|
319
|
+
// 保留远程端已拼好的代理链:A::B::C,而不是把中间跳数丢掉
|
|
320
|
+
const proxyChain = rc._proxyId ? `${conn.id}${REMOTE_ID_SEP}${rc._proxyId}` : conn.id;
|
|
238
321
|
result.push({
|
|
239
322
|
...safe,
|
|
240
323
|
id: `${conn.id}${REMOTE_ID_SEP}${rc.id}`,
|
|
241
|
-
_proxyId:
|
|
324
|
+
_proxyId: proxyChain,
|
|
242
325
|
_remote: true,
|
|
243
|
-
_remoteName: conn.name
|
|
326
|
+
_remoteName: rc._remoteName ? `${conn.name} → ${rc._remoteName}` : conn.name,
|
|
327
|
+
_hops: (Number(rc._hops) || 0) + 1
|
|
244
328
|
});
|
|
245
329
|
}
|
|
246
330
|
});
|
|
@@ -260,6 +344,109 @@ async function testRemoteConnection(conn: any): Promise<boolean> {
|
|
|
260
344
|
const connectionService = new ConnectionService();
|
|
261
345
|
const databaseService = new DatabaseService();
|
|
262
346
|
|
|
347
|
+
// ---------------- 定时备份(进程内调度) ----------------
|
|
348
|
+
|
|
349
|
+
interface BackupSchedule {
|
|
350
|
+
id: string;
|
|
351
|
+
connectionId: string;
|
|
352
|
+
databaseName: string;
|
|
353
|
+
intervalMinutes: number;
|
|
354
|
+
enabled: boolean;
|
|
355
|
+
createdAt: number;
|
|
356
|
+
lastRunAt?: number;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
const BACKUP_SCHEDULE_FILE = 'backup-schedules.json';
|
|
360
|
+
|
|
361
|
+
function loadBackupSchedules(): BackupSchedule[] {
|
|
362
|
+
try {
|
|
363
|
+
const raw = fs.readFileSync(getDataPath(BACKUP_SCHEDULE_FILE), 'utf8');
|
|
364
|
+
const parsed = JSON.parse(raw);
|
|
365
|
+
return Array.isArray(parsed) ? parsed.filter((s) => s && s.id && s.connectionId) : [];
|
|
366
|
+
} catch {
|
|
367
|
+
return [];
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// 所有备份计划的 load-modify-save(增删改/手动执行/定时扫描)共用一条串行队列,避免并发覆盖。
|
|
372
|
+
let scheduleTaskQueue: Promise<void> = Promise.resolve();
|
|
373
|
+
function enqueueScheduleTask<T>(task: () => Promise<T>): Promise<T> {
|
|
374
|
+
const result = scheduleTaskQueue.then(task);
|
|
375
|
+
scheduleTaskQueue = result.then(() => undefined, () => undefined);
|
|
376
|
+
return result;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
function saveBackupSchedules(schedules: BackupSchedule[]): void {
|
|
380
|
+
ensureDataDir();
|
|
381
|
+
const target = getDataPath(BACKUP_SCHEDULE_FILE);
|
|
382
|
+
const temp = `${target}.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
383
|
+
try {
|
|
384
|
+
fs.writeFileSync(temp, JSON.stringify(schedules, null, 2), 'utf8');
|
|
385
|
+
fs.renameSync(temp, target);
|
|
386
|
+
} catch (e) {
|
|
387
|
+
try {
|
|
388
|
+
fs.unlinkSync(temp);
|
|
389
|
+
} catch {
|
|
390
|
+
// 临时文件可能尚未创建或已被清理,忽略二次错误
|
|
391
|
+
}
|
|
392
|
+
throw e;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
const inFlightScheduleIds = new Set<string>();
|
|
397
|
+
|
|
398
|
+
/** 执行单个计划:成功才更新 lastRunAt,失败时保留原值供下一分钟重试。 */
|
|
399
|
+
async function executeBackupSchedule(schedule: BackupSchedule): Promise<string> {
|
|
400
|
+
if (inFlightScheduleIds.has(schedule.id)) throw new Error(`备份计划正在执行: ${schedule.id}`);
|
|
401
|
+
inFlightScheduleIds.add(schedule.id);
|
|
402
|
+
try {
|
|
403
|
+
const result = await databaseService.backupDatabase(schedule.connectionId, schedule.databaseName, {
|
|
404
|
+
scheduleId: schedule.id
|
|
405
|
+
});
|
|
406
|
+
schedule.lastRunAt = Date.now();
|
|
407
|
+
return result;
|
|
408
|
+
} finally {
|
|
409
|
+
inFlightScheduleIds.delete(schedule.id);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
let backupSweepRunning = false;
|
|
414
|
+
|
|
415
|
+
/** 每分钟检查一次到期的计划;仅在本服务进程存活期间运行。 */
|
|
416
|
+
async function runDueBackups(): Promise<void> {
|
|
417
|
+
if (backupSweepRunning) return; // 全局重入保护:上一轮未结束(含备份 I/O)时直接跳过本次 tick
|
|
418
|
+
backupSweepRunning = true;
|
|
419
|
+
try {
|
|
420
|
+
await enqueueScheduleTask(async () => {
|
|
421
|
+
const schedules = loadBackupSchedules();
|
|
422
|
+
const now = Date.now();
|
|
423
|
+
let changed = false;
|
|
424
|
+
for (const s of schedules) {
|
|
425
|
+
if (!s.enabled || inFlightScheduleIds.has(s.id)) continue;
|
|
426
|
+
const intervalMs = Math.max(1, Number(s.intervalMinutes) || 60) * 60 * 1000;
|
|
427
|
+
if (now - (s.lastRunAt || 0) < intervalMs) continue;
|
|
428
|
+
try {
|
|
429
|
+
await executeBackupSchedule(s);
|
|
430
|
+
changed = true;
|
|
431
|
+
} catch (e: any) {
|
|
432
|
+
console.warn(`[backup-schedule] ${s.connectionId}/${s.databaseName} 备份失败:`, e?.message || e);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
if (changed) saveBackupSchedules(schedules);
|
|
436
|
+
});
|
|
437
|
+
} finally {
|
|
438
|
+
backupSweepRunning = false;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
const backupScheduler = setInterval(() => {
|
|
443
|
+
runDueBackups().catch((e: any) => {
|
|
444
|
+
console.warn('[backup-schedule] 定时检查失败:', e?.message || e);
|
|
445
|
+
});
|
|
446
|
+
}, 60 * 1000);
|
|
447
|
+
// 不阻止进程退出(VSCode 扩展宿主 / CLI 也会导入本模块)
|
|
448
|
+
(backupScheduler as any).unref?.();
|
|
449
|
+
|
|
263
450
|
|
|
264
451
|
// 数据库相关路由处理
|
|
265
452
|
export async function handleDatabaseRoutes(pathname: string, body: any, headers?: any) {
|
|
@@ -279,7 +466,7 @@ export async function handleDatabaseRoutes(pathname: string, body: any, headers?
|
|
|
279
466
|
if (headers && headers[REMOTE_PROXY_HEADER]) {
|
|
280
467
|
return await connectionService.getAllConnections();
|
|
281
468
|
}
|
|
282
|
-
return await handleGetConnectionsWithProxy();
|
|
469
|
+
return await handleGetConnectionsWithProxy(headers);
|
|
283
470
|
}
|
|
284
471
|
|
|
285
472
|
// 远程代理连接本身的测试:直接探活远程服务
|
|
@@ -291,7 +478,7 @@ export async function handleDatabaseRoutes(pathname: string, body: any, headers?
|
|
|
291
478
|
// 覆盖数据操作(查询/建表/改结构等)与连接配置的增删改
|
|
292
479
|
const proxy = await resolveRemoteProxy(pathname, body);
|
|
293
480
|
if (proxy) {
|
|
294
|
-
return await proxyToRemote(proxy.proxyConn, proxy.remoteConnId, pathname, body);
|
|
481
|
+
return await proxyToRemote(proxy.proxyConn, proxy.remoteConnId, pathname, body, chainFromHeaders(headers));
|
|
295
482
|
}
|
|
296
483
|
|
|
297
484
|
// 对「远程代理配置」本身做数据操作时给出明确提示(配置本身的增删改是允许的)
|
|
@@ -341,6 +528,24 @@ export async function handleDatabaseRoutes(pathname: string, body: any, headers?
|
|
|
341
528
|
return result;
|
|
342
529
|
}
|
|
343
530
|
|
|
531
|
+
// /api/database/health/:id/:database(或 ?id=...)——连通性探活。
|
|
532
|
+
// 客户端 checkDatabaseHealth 早在 UI 前就声明了此路由,但此前服务端没有实现。
|
|
533
|
+
if (pathname === '/api/database/health' || pathname.startsWith('/api/database/health/')) {
|
|
534
|
+
const parts = pathname.split('/').filter(Boolean);
|
|
535
|
+
const id = extractConnId(pathname, body);
|
|
536
|
+
if (!id) throw Error('Missing parameter: id');
|
|
537
|
+
const database = body?.database || parts[4];
|
|
538
|
+
if (database) {
|
|
539
|
+
// 指定库时真正连接并读取库信息,失败由 getDatabaseInfo 抛出异常返回。
|
|
540
|
+
const info = await databaseService.getDatabaseInfo(id, database);
|
|
541
|
+
if (!info) throw Error(`数据库不存在: ${database}`);
|
|
542
|
+
return { healthy: true, database };
|
|
543
|
+
}
|
|
544
|
+
// 未指定库时保留列库检查,适用于关系型与文档型;不执行方言专有 SQL。
|
|
545
|
+
const databases = await databaseService.getDatabases(id);
|
|
546
|
+
return { healthy: true, databaseCount: Array.isArray(databases) ? databases.length : 0 };
|
|
547
|
+
}
|
|
548
|
+
|
|
344
549
|
// /api/database/getDatabases
|
|
345
550
|
if (pathname === '/api/database/getDatabases') {
|
|
346
551
|
const { id } = body;
|
|
@@ -485,6 +690,70 @@ export async function handleDatabaseRoutes(pathname: string, body: any, headers?
|
|
|
485
690
|
return { success: true, result };
|
|
486
691
|
}
|
|
487
692
|
|
|
693
|
+
// 定时备份计划:配置持久化在数据目录,调度由本进程每分钟检查一次
|
|
694
|
+
if (pathname === '/api/database/getBackupSchedules') {
|
|
695
|
+
return { schedules: loadBackupSchedules() };
|
|
696
|
+
}
|
|
697
|
+
if (pathname === '/api/database/addBackupSchedule') {
|
|
698
|
+
const { connectionId, databaseName, intervalMinutes = 60, enabled = true } = body || {};
|
|
699
|
+
if (!connectionId || !databaseName) throw Error('Missing parameters: connectionId, databaseName');
|
|
700
|
+
return await enqueueScheduleTask(async () => {
|
|
701
|
+
const schedules = loadBackupSchedules();
|
|
702
|
+
const item: BackupSchedule = {
|
|
703
|
+
id: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
704
|
+
connectionId,
|
|
705
|
+
databaseName,
|
|
706
|
+
intervalMinutes: Math.max(1, Math.floor(Number(intervalMinutes) || 60)),
|
|
707
|
+
enabled: !!enabled,
|
|
708
|
+
createdAt: Date.now()
|
|
709
|
+
};
|
|
710
|
+
schedules.push(item);
|
|
711
|
+
saveBackupSchedules(schedules);
|
|
712
|
+
return { schedule: item };
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
if (pathname === '/api/database/updateBackupSchedule') {
|
|
716
|
+
const { id, ...updates } = body || {};
|
|
717
|
+
if (!id) throw Error('Missing parameter: id');
|
|
718
|
+
return await enqueueScheduleTask(async () => {
|
|
719
|
+
const schedules = loadBackupSchedules();
|
|
720
|
+
const item = schedules.find((s) => s.id === id);
|
|
721
|
+
if (!item) throw Error(`备份计划不存在: ${id}`);
|
|
722
|
+
// 只接受可编辑字段,禁止外部改写 lastRunAt / createdAt / id 等运行时字段。
|
|
723
|
+
if (updates.connectionId !== undefined) item.connectionId = String(updates.connectionId);
|
|
724
|
+
if (updates.databaseName !== undefined) item.databaseName = String(updates.databaseName);
|
|
725
|
+
if (updates.intervalMinutes !== undefined) {
|
|
726
|
+
item.intervalMinutes = Math.max(1, Math.floor(Number(updates.intervalMinutes) || 60));
|
|
727
|
+
}
|
|
728
|
+
if (updates.enabled !== undefined) item.enabled = !!updates.enabled;
|
|
729
|
+
saveBackupSchedules(schedules);
|
|
730
|
+
return { schedule: item };
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
if (pathname === '/api/database/deleteBackupSchedule') {
|
|
734
|
+
const { id } = body || {};
|
|
735
|
+
if (!id) throw Error('Missing parameter: id');
|
|
736
|
+
return await enqueueScheduleTask(async () => {
|
|
737
|
+
const schedules = loadBackupSchedules();
|
|
738
|
+
const kept = schedules.filter((s) => s.id !== id);
|
|
739
|
+
if (kept.length === schedules.length) throw Error(`备份计划不存在: ${id}`);
|
|
740
|
+
saveBackupSchedules(kept);
|
|
741
|
+
return { success: true };
|
|
742
|
+
});
|
|
743
|
+
}
|
|
744
|
+
if (pathname === '/api/database/runBackupSchedule') {
|
|
745
|
+
const { id } = body || {};
|
|
746
|
+
if (!id) throw Error('Missing parameter: id');
|
|
747
|
+
return await enqueueScheduleTask(async () => {
|
|
748
|
+
const schedules = loadBackupSchedules();
|
|
749
|
+
const schedule = schedules.find((s) => s.id === id);
|
|
750
|
+
if (!schedule) throw Error(`备份计划不存在: ${id}`);
|
|
751
|
+
const result = await executeBackupSchedule(schedule);
|
|
752
|
+
saveBackupSchedules(schedules);
|
|
753
|
+
return { success: true, result };
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
|
|
488
757
|
// /api/database/restore
|
|
489
758
|
if (pathname === '/api/database/restore') {
|
|
490
759
|
const { id, databaseName, filePath, options } = body;
|
|
@@ -629,6 +898,13 @@ export async function handleDatabaseRoutes(pathname: string, body: any, headers?
|
|
|
629
898
|
return result;
|
|
630
899
|
}
|
|
631
900
|
|
|
901
|
+
// /api/database/importData:浏览器解析文件后按批提交行数组,服务端按方言 bulkInsert
|
|
902
|
+
if (pathname === '/api/database/importData') {
|
|
903
|
+
const { id, database, table, rows } = body;
|
|
904
|
+
if (!id || !database || !table || !Array.isArray(rows)) throw Error('Missing parameters: id, database, table, rows');
|
|
905
|
+
return await databaseService.importData(id, database, table, rows);
|
|
906
|
+
}
|
|
907
|
+
|
|
632
908
|
// /api/database/insertData
|
|
633
909
|
if (pathname === '/api/database/insertData') {
|
|
634
910
|
const { id, database, table, data } = body;
|
|
@@ -883,6 +1159,11 @@ function generateUpdateSQL(dbType: string, tableName: string, data: any, where:
|
|
|
883
1159
|
})
|
|
884
1160
|
.join(' AND ');
|
|
885
1161
|
|
|
1162
|
+
// ClickHouse 的 MergeTree 不支持标准 UPDATE;必须用 ALTER TABLE ... UPDATE(DELETE 同理)。
|
|
1163
|
+
// mutation 默认是异步的,加 mutations_sync=1 等待完成,避免 UI 立即刷新仍读到旧值。
|
|
1164
|
+
if (dbType === 'clickhouse') {
|
|
1165
|
+
return `ALTER TABLE ${dbService.quoteIdentifier(tableName)} UPDATE ${setClause} WHERE ${whereClause} SETTINGS mutations_sync = 1;`;
|
|
1166
|
+
}
|
|
886
1167
|
return `UPDATE ${dbService.quoteIdentifier(tableName)} SET ${setClause} WHERE ${whereClause};`;
|
|
887
1168
|
}
|
|
888
1169
|
|
|
@@ -896,6 +1177,9 @@ function generateDeleteSQL(dbType: string, tableName: string, where: any, dbServ
|
|
|
896
1177
|
})
|
|
897
1178
|
.join(' AND ');
|
|
898
1179
|
|
|
1180
|
+
if (dbType === 'clickhouse') {
|
|
1181
|
+
return `ALTER TABLE ${dbService.quoteIdentifier(tableName)} DELETE WHERE ${whereClause} SETTINGS mutations_sync = 1;`;
|
|
1182
|
+
}
|
|
899
1183
|
return `DELETE FROM ${dbService.quoteIdentifier(tableName)} WHERE ${whereClause};`;
|
|
900
1184
|
}
|
|
901
1185
|
|
|
@@ -277,7 +277,7 @@ class CockroachDBService extends base_service_1.BaseDatabaseService {
|
|
|
277
277
|
const result = await dataSource.query(`
|
|
278
278
|
SELECT
|
|
279
279
|
p.proname as name,
|
|
280
|
-
pg_get_userbyid(p.proowner)
|
|
280
|
+
pg_get_userbyid(p.proowner) as owner,
|
|
281
281
|
pg_get_functiondef(p.oid) as definition
|
|
282
282
|
FROM
|
|
283
283
|
pg_proc p
|
|
@@ -262,7 +262,7 @@ export class CockroachDBService extends BaseDatabaseService {
|
|
|
262
262
|
const result = await dataSource.query(`
|
|
263
263
|
SELECT
|
|
264
264
|
p.proname as name,
|
|
265
|
-
pg_get_userbyid(p.proowner)
|
|
265
|
+
pg_get_userbyid(p.proowner) as owner,
|
|
266
266
|
pg_get_functiondef(p.oid) as definition
|
|
267
267
|
FROM
|
|
268
268
|
pg_proc p
|
|
@@ -2,6 +2,12 @@ import { ConnectionService } from '../connection.service';
|
|
|
2
2
|
import { BaseDatabaseService } from './base.service';
|
|
3
3
|
import { DatabaseEntity, TableEntity } from '../../model/database.entity';
|
|
4
4
|
import type { DdlCapability, DdlExecuteResult, DdlPreview, TableSpec } from '../../model/ddl-spec';
|
|
5
|
+
/** 纯函数:把导入行按 getColumns 的列全集归一化,供测试与 importData 共用。 */
|
|
6
|
+
export declare function normalizeImportRows(rows: any[], columns: any[]): any[];
|
|
7
|
+
/** 同步到关系库时,把文档库里的 BSON/嵌套值转成驱动可绑定的标量。 */
|
|
8
|
+
export declare function normalizeSyncRowForRelational(row: any): Record<string, any>;
|
|
9
|
+
/** 同一批次按字段并集补齐,避免 bulkInsert 只取首行字段导致后续文档字段丢失。 */
|
|
10
|
+
export declare function normalizeSyncRowsForRelational(rows: any[]): Record<string, any>[];
|
|
5
11
|
/**
|
|
6
12
|
* 数据库服务管理类
|
|
7
13
|
* 负责根据数据库类型选择相应的服务实现
|
|
@@ -160,16 +166,26 @@ export declare class DatabaseService {
|
|
|
160
166
|
*/
|
|
161
167
|
getDatabaseStats(connectionId: string, databaseName: string): Promise<any>;
|
|
162
168
|
/**
|
|
163
|
-
*
|
|
169
|
+
* 维护操作(OPTIMIZE / ANALYZE / REPAIR)的方言适配。
|
|
170
|
+
*
|
|
171
|
+
* 原先三个方法对所有连接都拼 MySQL 语法,PostgreSQL/SQLite/MongoDB 等
|
|
172
|
+
* 必然报错;CLI 侧早已明确拒绝非 MySQL。这里按方言给出等价语句或清晰
|
|
173
|
+
* 的「不支持」结果,而不是让驱动抛原始 SQL 错误。
|
|
164
174
|
*/
|
|
165
|
-
|
|
175
|
+
private runMaintenance;
|
|
166
176
|
/**
|
|
167
|
-
*
|
|
177
|
+
* 批量导入:文件解析在浏览器完成,这里接收行数组并走各方言 bulkInsert。
|
|
178
|
+
* 按表结构过滤未知列并做轻量类型转换(CSV 里一切都是字符串)。
|
|
168
179
|
*/
|
|
180
|
+
importData(connectionId: string, databaseName: string, tableName: string, rows: any[]): Promise<{
|
|
181
|
+
imported: number;
|
|
182
|
+
table: string;
|
|
183
|
+
}>;
|
|
184
|
+
/** 优化数据库 */
|
|
185
|
+
optimizeDatabase(connectionId: string, databaseName: string): Promise<any>;
|
|
186
|
+
/** 分析表 */
|
|
169
187
|
analyzeTables(connectionId: string, databaseName: string): Promise<any>;
|
|
170
|
-
/**
|
|
171
|
-
* 修复表
|
|
172
|
-
*/
|
|
188
|
+
/** 修复表 */
|
|
173
189
|
repairTables(connectionId: string, databaseName: string): Promise<any>;
|
|
174
190
|
/**
|
|
175
191
|
* 导出表数据到 SQL 文件
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.service.d.ts","sourceRoot":"","sources":["../../../../server/service/database/database.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EACL,cAAc,EACd,WAAW,EACZ,MAAM,6BAA6B,CAAC;AAKrC,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"database.service.d.ts","sourceRoot":"","sources":["../../../../server/service/database/database.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EACL,cAAc,EACd,WAAW,EACZ,MAAM,6BAA6B,CAAC;AAKrC,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AA2DnG,uDAAuD;AACvD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE,CA8BtE;AAED,yCAAyC;AACzC,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAmB3E;AAED,kDAAkD;AAClD,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAiBjF;AAED;;;GAGG;AACH,qBAAa,eAAe;IAEnB,iBAAiB,EAAE,iBAAiB,CAAC;IAC5C,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,iBAA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