release: v0.2.2 AriaEngine OPFS 自研存储后端 — 零依赖纯文件系统
CI / test (18.x) (push) Successful in 10m0s
CI / test (20.x) (push) Successful in 9m56s
CI / test (22.x) (push) Successful in 9m56s
CI / test (24.x) (push) Successful in 9m52s

This commit is contained in:
thzxx
2026-07-27 21:08:57 +08:00
parent eab58adc37
commit fef4db44ca
18 changed files with 450 additions and 73 deletions
+4 -1
View File
@@ -25,6 +25,7 @@ import { WAL } from './wal/log';
import { WALRecordType, type WALRecord } from './types';
import { CheckpointManager } from './wal/checkpoint';
import { IndexedDBBackend, MemoryBackend, type IStorageBackend } from './store/backend';
import { OPFSBackend } from './store/opfs_backend';
// ---------------------------------------------------------------------------
// AriaEngine
@@ -63,7 +64,9 @@ export class AriaEngine implements IStorageEngine {
this.dbName = dbName;
// 1. 存储后端
if (this.config.storageBackend === 'indexeddb') {
if (this.config.storageBackend === 'opfs') {
this.backend = new OPFSBackend();
} else if (this.config.storageBackend === 'indexeddb') {
this.backend = new IndexedDBBackend();
} else {
this.backend = new MemoryBackend();