release: v0.1.14 生产加固 — IDB事务原子性/多标签页感知/幂等init
This commit is contained in:
@@ -24,7 +24,13 @@ export class MemoryEngine implements IStorageEngine {
|
||||
} | null = null;
|
||||
|
||||
// ---- 生命周期 ----
|
||||
async open(_dbName: string, _version: number): Promise<void> { this.opened = true; }
|
||||
async open(_dbName: string, _version: number): Promise<void> {
|
||||
if (this.opened) {
|
||||
// 幂等:已打开则忽略
|
||||
return;
|
||||
}
|
||||
this.opened = true;
|
||||
}
|
||||
async close(): Promise<void> {
|
||||
this.tables.clear(); this.schemas.clear(); this.indexes.clear(); this.opened = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user