serializable-bptree 8.3.2 → 8.3.3

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.
@@ -1620,7 +1620,7 @@ var BPTreeTransaction = class _BPTreeTransaction {
1620
1620
  },
1621
1621
  primaryGt: {
1622
1622
  asc: {
1623
- start: (tx, v) => tx.insertableNodeByPrimary(v[0]),
1623
+ start: (tx, v) => tx.insertableRightestEndNodeByPrimary(v[0]),
1624
1624
  end: () => null,
1625
1625
  direction: 1,
1626
1626
  earlyTerminate: false
@@ -2161,7 +2161,7 @@ var BPTreeSyncTransaction = class extends BPTreeTransaction {
2161
2161
  return this.getNode(node.next);
2162
2162
  }
2163
2163
  insertableEndNode(value, direction) {
2164
- const insertableNode = this.insertableNode(value);
2164
+ const insertableNode = direction === -1 ? this.insertableNodeByPrimary(value) : this.insertableRightestNodeByPrimary(value);
2165
2165
  let key;
2166
2166
  switch (direction) {
2167
2167
  case -1:
@@ -3297,7 +3297,7 @@ var BPTreeAsyncTransaction = class extends BPTreeTransaction {
3297
3297
  return await this.getNode(node.next);
3298
3298
  }
3299
3299
  async insertableEndNode(value, direction) {
3300
- const insertableNode = await this.insertableNode(value);
3300
+ const insertableNode = direction === -1 ? await this.insertableNodeByPrimary(value) : await this.insertableRightestNodeByPrimary(value);
3301
3301
  let key;
3302
3302
  switch (direction) {
3303
3303
  case -1:
@@ -1584,7 +1584,7 @@ var BPTreeTransaction = class _BPTreeTransaction {
1584
1584
  },
1585
1585
  primaryGt: {
1586
1586
  asc: {
1587
- start: (tx, v) => tx.insertableNodeByPrimary(v[0]),
1587
+ start: (tx, v) => tx.insertableRightestEndNodeByPrimary(v[0]),
1588
1588
  end: () => null,
1589
1589
  direction: 1,
1590
1590
  earlyTerminate: false
@@ -2125,7 +2125,7 @@ var BPTreeSyncTransaction = class extends BPTreeTransaction {
2125
2125
  return this.getNode(node.next);
2126
2126
  }
2127
2127
  insertableEndNode(value, direction) {
2128
- const insertableNode = this.insertableNode(value);
2128
+ const insertableNode = direction === -1 ? this.insertableNodeByPrimary(value) : this.insertableRightestNodeByPrimary(value);
2129
2129
  let key;
2130
2130
  switch (direction) {
2131
2131
  case -1:
@@ -3261,7 +3261,7 @@ var BPTreeAsyncTransaction = class extends BPTreeTransaction {
3261
3261
  return await this.getNode(node.next);
3262
3262
  }
3263
3263
  async insertableEndNode(value, direction) {
3264
- const insertableNode = await this.insertableNode(value);
3264
+ const insertableNode = direction === -1 ? await this.insertableNodeByPrimary(value) : await this.insertableRightestNodeByPrimary(value);
3265
3265
  let key;
3266
3266
  switch (direction) {
3267
3267
  case -1:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "serializable-bptree",
3
- "version": "8.3.2",
3
+ "version": "8.3.3",
4
4
  "description": "Store the B+tree flexibly, not only in-memory.",
5
5
  "types": "./dist/types/index.d.ts",
6
6
  "main": "./dist/cjs/index.cjs",