From 9c109b4619bc3709cab74750ffdabed8827e5939 Mon Sep 17 00:00:00 2001 From: thzxx Date: Mon, 10 Aug 2026 21:30:56 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E6=AE=8B=E7=95=99=20tests/zz-dbg.test.ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/zz-dbg.test.ts | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 tests/zz-dbg.test.ts diff --git a/tests/zz-dbg.test.ts b/tests/zz-dbg.test.ts deleted file mode 100644 index e72f9c1..0000000 --- a/tests/zz-dbg.test.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { AriaEngine } from '../src/engine/aria/index'; -import { createSchema } from '../src/table/schema'; - -it('dbg: call fk directly', async () => { - const engine = new AriaEngine({ storageBackend: 'memory' } as never); - await engine.open('dbg-fk2', 1); - await engine.createTable(createSchema('parent', { - id: { type: 'string', primaryKey: true }, - })); - await engine.createTable(createSchema('child', { - id: { type: 'string', primaryKey: true }, - pid: { type: 'string', references: 'parent:id', onDelete: 'CASCADE' }, - })); - await engine.insert('parent', [{ id: 'p1' }]); - await engine.insert('child', [{ id: 'c1', pid: 'p1' }]); - const wal: unknown[] = []; - const n = await (engine as any).applyForeignKeyRules('parent', 'p1', wal, new Set()); - console.log('fk direct result:', n, 'wal records:', wal.length); - console.log('child count after fk:', await engine.count('child')); - // 手动 CASCADE 验证 - const c = await (engine as any).lsm.get('child:c1'); - console.log('child:c1 in lsm:', c ? 'YES' : 'NO'); - await engine.close(); -});