mvcc-api 1.2.5 → 1.2.7

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.
@@ -22,6 +22,8 @@ var src_exports = {};
22
22
  __export(src_exports, {
23
23
  AsyncMVCCStrategy: () => AsyncMVCCStrategy,
24
24
  AsyncMVCCTransaction: () => AsyncMVCCTransaction,
25
+ MVCCStrategy: () => MVCCStrategy,
26
+ MVCCTransaction: () => MVCCTransaction,
25
27
  SyncMVCCStrategy: () => SyncMVCCStrategy,
26
28
  SyncMVCCTransaction: () => SyncMVCCTransaction
27
29
  });
@@ -1125,6 +1125,8 @@ var AsyncMVCCTransaction = class _AsyncMVCCTransaction extends MVCCTransaction {
1125
1125
  export {
1126
1126
  AsyncMVCCStrategy,
1127
1127
  AsyncMVCCTransaction,
1128
+ MVCCStrategy,
1129
+ MVCCTransaction,
1128
1130
  SyncMVCCStrategy,
1129
1131
  SyncMVCCTransaction
1130
1132
  };
@@ -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: MVCCTransaction<S, K, T>): Promise<TransactionMergeFailure<K, T> | null>;
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;
@@ -1,2 +1,4 @@
1
+ export { TransactionEntry, TransactionConflict, TransactionMergeFailure, TransactionResult } from './types';
2
+ export * from './core/base';
1
3
  export * from './core/sync';
2
4
  export * from './core/async';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mvcc-api",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "Multiversion Concurrency Control (MVCC) API for TypeScript",
5
5
  "license": "MIT",
6
6
  "author": "izure <admin@izure.org>",