dataply 0.0.26-alpha.3 → 0.0.26-alpha.5

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.
@@ -1,5 +1,5 @@
1
1
  import type { DataplyMetadata, DataplyOptions } from '../types';
2
- import { BPTreeAsync } from 'serializable-bptree';
2
+ import { BPTreePureAsync } from 'serializable-bptree';
3
3
  import { RowIdentifierStrategy } from './RowIndexStrategy';
4
4
  import { PageFileSystem } from './PageFileSystem';
5
5
  import { Row } from './Row';
@@ -12,7 +12,7 @@ export declare class RowTableEngine {
12
12
  protected readonly pfs: PageFileSystem;
13
13
  protected readonly txContext: TransactionContext;
14
14
  protected readonly options: Required<DataplyOptions>;
15
- protected readonly bptree: BPTreeAsync<number, number>;
15
+ protected readonly bptree: BPTreePureAsync<number, number>;
16
16
  protected readonly strategy: RowIdentifierStrategy;
17
17
  protected readonly order: number;
18
18
  protected readonly factory: PageManagerFactory;
@@ -27,13 +27,6 @@ export declare class RowTableEngine {
27
27
  private readonly logger;
28
28
  private initialized;
29
29
  constructor(pfs: PageFileSystem, txContext: TransactionContext, options: Required<DataplyOptions>, logger: Logger);
30
- /**
31
- * Retrieves the BPTree transaction associated with the given transaction.
32
- * If it doesn't exist, it creates a new one and registers commit/rollback hooks.
33
- * @param tx Dataply transaction
34
- * @returns BPTree transaction
35
- */
36
- private getBPTreeTransaction;
37
30
  /**
38
31
  * Initializes the B+ Tree.
39
32
  */
@@ -1,5 +1,4 @@
1
1
  import type { PageFileSystem } from '../PageFileSystem';
2
- import { BPTreeAsyncTransaction } from 'serializable-bptree';
3
2
  import { LockManager } from './LockManager';
4
3
  import { TransactionContext } from './TxContext';
5
4
  import { PageMVCCStrategy } from '../PageMVCCStrategy';
@@ -21,10 +20,6 @@ export declare class Transaction {
21
20
  private dirtyPages;
22
21
  /** Undo pages: PageID -> Original Page Buffer (Snapshot) */
23
22
  private undoPages;
24
- /** BPTree Transaction instance */
25
- private bptreeTx?;
26
- /** Whether the BPTree transaction is dirty */
27
- private bptreeDirty;
28
23
  /** List of callbacks to execute on commit */
29
24
  private commitHooks;
30
25
  /** Page MVCC Strategy for disk access */
@@ -37,27 +32,9 @@ export declare class Transaction {
37
32
  * @param pageStrategy Page MVCC Strategy for disk I/O
38
33
  * @param lockManager LockManager instance
39
34
  * @param pfs Page File System
35
+ * @param reloadBPTree Callback to reload BPTree cache on rollback
40
36
  */
41
37
  constructor(id: number, context: TransactionContext, pageStrategy: PageMVCCStrategy, lockManager: LockManager, pfs: PageFileSystem);
42
- /**
43
- * Sets the BPTree transaction.
44
- * @param tx BPTree transaction
45
- */
46
- __setBPTreeTransaction(tx: BPTreeAsyncTransaction<number, number>): void;
47
- /**
48
- * Returns the BPTree transaction.
49
- * @returns BPTree transaction
50
- */
51
- __getBPTreeTransaction(): BPTreeAsyncTransaction<number, number> | undefined;
52
- /**
53
- * Marks the BPTree transaction as dirty.
54
- */
55
- __markBPTreeDirty(): void;
56
- /**
57
- * Returns whether the BPTree transaction is dirty.
58
- * @returns True if dirty
59
- */
60
- __isBPTreeDirty(): boolean;
61
38
  /**
62
39
  * Registers a commit hook.
63
40
  * @param hook Function to execute
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dataply",
3
- "version": "0.0.26-alpha.3",
3
+ "version": "0.0.26-alpha.5",
4
4
  "description": "A lightweight storage engine for Node.js with support for MVCC, WAL.",
5
5
  "license": "MIT",
6
6
  "author": "izure <admin@izure.org>",
@@ -47,8 +47,8 @@
47
47
  "dependencies": {
48
48
  "cache-entanglement": "^1.7.1",
49
49
  "hookall": "^2.2.0",
50
- "mvcc-api": "^1.3.5",
50
+ "mvcc-api": "^1.3.7",
51
51
  "ryoiki": "^1.2.0",
52
- "serializable-bptree": "^8.4.0"
52
+ "serializable-bptree": "^9.0.0"
53
53
  }
54
54
  }