release: v0.5.1 — 存储后端生产级硬化(CRC-32/全库加密/WAL分片/页面化存储/多标签页锁/e2e)+ 深度审查修复(假实现接线/死代码清理)
This commit is contained in:
@@ -81,23 +81,6 @@ describe('AriaEngine — ANALYZE/VACUUM/REINDEX + EXPLAIN', () => {
|
||||
expect(plan.actualTimeMs).toBeGreaterThanOrEqual(0);
|
||||
});
|
||||
|
||||
// ---- 查询优化器 ----
|
||||
it('estimateQueryCost PK 等值 → pk_lookup', () => {
|
||||
const cost = (engine as any).estimateQueryCost('users', { table: 'users', where: { id: '1' } });
|
||||
expect(cost.strategy).toBe('pk_lookup');
|
||||
expect(cost.estimatedRows).toBe(1);
|
||||
});
|
||||
|
||||
it('estimateQueryCost 索引等值 → index_eq', () => {
|
||||
const cost = (engine as any).estimateQueryCost('users', { table: 'users', where: { name: 'Alice' } });
|
||||
expect(cost.strategy).toBe('index_eq:name');
|
||||
});
|
||||
|
||||
it('estimateQueryCost 无索引 → full_scan', () => {
|
||||
const cost = (engine as any).estimateQueryCost('users', { table: 'users', where: { age: { $gt: 20 } } });
|
||||
expect(cost.strategy).toMatch(/index_range|full_scan/);
|
||||
});
|
||||
|
||||
// ---- 在线备份 ----
|
||||
it('backup 导出全库一致性快照', async () => {
|
||||
const backup = await (engine as any).backup();
|
||||
|
||||
Reference in New Issue
Block a user