feat: v0.2.4 OPFS写锁 + 性能基准 + BufferPool集成 + REINDEX/VACUUM + 查询优化器
This commit is contained in:
Vendored
+20
@@ -694,6 +694,7 @@ declare class AriaEngine implements IStorageEngine {
|
||||
private currentTxnId;
|
||||
private txnSnapshot;
|
||||
private gcCounter;
|
||||
private bufferPool;
|
||||
constructor(config?: AriaEngineConfig);
|
||||
open(dbName: string, _version: number): Promise<void>;
|
||||
close(): Promise<void>;
|
||||
@@ -740,6 +741,24 @@ declare class AriaEngine implements IStorageEngine {
|
||||
* 返回行数、平均行大小、索引深度等
|
||||
*/
|
||||
analyzeTable(tableName: string): Promise<Record<string, unknown>>;
|
||||
/**
|
||||
* REINDEX: 重建指定表的所有二级索引
|
||||
*/
|
||||
reindexTable(tableName: string): Promise<number>;
|
||||
/**
|
||||
* VACUUM: 压缩 LSM + 清理碎片
|
||||
*/
|
||||
vacuum(): Promise<{
|
||||
compactedLevels: number;
|
||||
gcVersions: number;
|
||||
}>;
|
||||
/**
|
||||
* 查询优化器:估算各索引成本,选择最优方案
|
||||
*/
|
||||
estimateQueryCost(tableName: string, query: QueryPlan): {
|
||||
strategy: string;
|
||||
estimatedRows: number;
|
||||
};
|
||||
private ensureOpen;
|
||||
private ensureTable;
|
||||
/** Get the number of WAL records stored */
|
||||
@@ -930,6 +949,7 @@ declare class OPFSBackend implements IStorageBackend {
|
||||
private root;
|
||||
private dbDir;
|
||||
private dbName;
|
||||
private writeQueue;
|
||||
open(name: string): Promise<void>;
|
||||
close(): Promise<void>;
|
||||
isOpen(): boolean;
|
||||
|
||||
Reference in New Issue
Block a user