mvcc-api 1.2.6 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.cjs
CHANGED
|
@@ -300,6 +300,7 @@ var SyncMVCCTransaction = class _SyncMVCCTransaction extends MVCCTransaction {
|
|
|
300
300
|
this.originallyExisted.clear();
|
|
301
301
|
this.keyVersions.clear();
|
|
302
302
|
this.localVersion = 0;
|
|
303
|
+
this.snapshotVersion = this.version;
|
|
303
304
|
}
|
|
304
305
|
}
|
|
305
306
|
return {
|
|
@@ -929,6 +930,7 @@ var AsyncMVCCTransaction = class _AsyncMVCCTransaction extends MVCCTransaction {
|
|
|
929
930
|
this.originallyExisted.clear();
|
|
930
931
|
this.keyVersions.clear();
|
|
931
932
|
this.localVersion = 0;
|
|
933
|
+
this.snapshotVersion = this.version;
|
|
932
934
|
}
|
|
933
935
|
}
|
|
934
936
|
return {
|
package/dist/esm/index.mjs
CHANGED
|
@@ -269,6 +269,7 @@ var SyncMVCCTransaction = class _SyncMVCCTransaction extends MVCCTransaction {
|
|
|
269
269
|
this.originallyExisted.clear();
|
|
270
270
|
this.keyVersions.clear();
|
|
271
271
|
this.localVersion = 0;
|
|
272
|
+
this.snapshotVersion = this.version;
|
|
272
273
|
}
|
|
273
274
|
}
|
|
274
275
|
return {
|
|
@@ -898,6 +899,7 @@ var AsyncMVCCTransaction = class _AsyncMVCCTransaction extends MVCCTransaction {
|
|
|
898
899
|
this.originallyExisted.clear();
|
|
899
900
|
this.keyVersions.clear();
|
|
900
901
|
this.localVersion = 0;
|
|
902
|
+
this.snapshotVersion = this.version;
|
|
901
903
|
}
|
|
902
904
|
}
|
|
903
905
|
return {
|
|
@@ -12,7 +12,7 @@ export declare class AsyncMVCCTransaction<S extends AsyncMVCCStrategy<K, T>, K,
|
|
|
12
12
|
exists(key: K): Promise<boolean>;
|
|
13
13
|
_readSnapshot(key: K, snapshotVersion: number, snapshotLocalVersion?: number): Promise<T | null>;
|
|
14
14
|
commit(label?: string): Promise<TransactionResult<K, T>>;
|
|
15
|
-
_merge(child:
|
|
15
|
+
_merge(child: AsyncMVCCTransaction<S, K, T>): Promise<TransactionMergeFailure<K, T> | null>;
|
|
16
16
|
_diskWrite(key: K, value: T, version: number): Promise<void>;
|
|
17
17
|
_diskRead(key: K, snapshotVersion: number): Promise<T | null>;
|
|
18
18
|
_diskExists(key: K, snapshotVersion: number): Promise<boolean>;
|
|
@@ -11,15 +11,15 @@ import type { MVCCStrategy } from './Strategy';
|
|
|
11
11
|
export declare abstract class MVCCTransaction<S extends MVCCStrategy<K, T>, K, T> {
|
|
12
12
|
committed: boolean;
|
|
13
13
|
readonly snapshotVersion: number;
|
|
14
|
-
readonly snapshotLocalVersion: number;
|
|
15
|
-
readonly writeBuffer: Map<K, T>;
|
|
16
|
-
readonly deleteBuffer: Set<K>;
|
|
17
|
-
readonly createdKeys: Set<K>;
|
|
18
|
-
readonly deletedValues: Map<K, T>;
|
|
19
|
-
readonly originallyExisted: Set<K>;
|
|
20
|
-
readonly parent?: MVCCTransaction<S, K, T>;
|
|
14
|
+
protected readonly snapshotLocalVersion: number;
|
|
15
|
+
protected readonly writeBuffer: Map<K, T>;
|
|
16
|
+
protected readonly deleteBuffer: Set<K>;
|
|
17
|
+
protected readonly createdKeys: Set<K>;
|
|
18
|
+
protected readonly deletedValues: Map<K, T>;
|
|
19
|
+
protected readonly originallyExisted: Set<K>;
|
|
20
|
+
protected readonly parent?: MVCCTransaction<S, K, T>;
|
|
21
21
|
localVersion: number;
|
|
22
|
-
readonly keyVersions: Map<K, number>;
|
|
22
|
+
protected readonly keyVersions: Map<K, number>;
|
|
23
23
|
readonly root: MVCCTransaction<S, K, T>;
|
|
24
24
|
protected strategy?: S;
|
|
25
25
|
protected version: number;
|