@harperfast/rocksdb-js 0.1.13 → 1.0.0

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/index.cjs CHANGED
@@ -32,7 +32,7 @@ let node_module = require("node:module");
32
32
  let node_path = require("node:path");
33
33
  let node_url = require("node:url");
34
34
  let ordered_binary = require("ordered-binary");
35
- ordered_binary = __toESM(ordered_binary);
35
+ ordered_binary = __toESM(ordered_binary, 1);
36
36
  let _harperfast_extended_iterable = require("@harperfast/extended-iterable");
37
37
  let msgpackr = require("msgpackr");
38
38
 
@@ -1801,23 +1801,23 @@ Object.defineProperty(TransactionLog.prototype, "query", { value({ start, end, e
1801
1801
  size = logBuffer.size ?? (logBuffer.size = transactionLog.getLogFileSize(logBuffer.logId));
1802
1802
  if (position >= size) {
1803
1803
  const nextLogBuffer = getLogMemoryMap(transactionLog, logBuffer.logId + 1);
1804
- dataView = nextLogBuffer.dataView;
1805
- logBuffer = nextLogBuffer;
1806
- if (latestLogId > logBuffer.logId) size = logBuffer.size ?? (logBuffer.size = transactionLog.getLogFileSize(logBuffer.logId));
1807
- else size = latestSize;
1808
- position = TRANSACTION_LOG_FILE_HEADER_SIZE;
1804
+ if (nextLogBuffer) {
1805
+ dataView = nextLogBuffer.dataView;
1806
+ logBuffer = nextLogBuffer;
1807
+ if (latestLogId > logBuffer.logId) size = logBuffer.size ?? (logBuffer.size = transactionLog.getLogFileSize(logBuffer.logId));
1808
+ else size = latestSize;
1809
+ position = TRANSACTION_LOG_FILE_HEADER_SIZE;
1810
+ }
1809
1811
  }
1810
1812
  }
1811
1813
  }
1812
1814
  while (position < size) {
1813
- do
1814
- try {
1815
- timestamp = dataView.getFloat64(position);
1816
- } catch (error) {
1817
- error.message += ` at position ${position} of log ${logBuffer.logId} (size=${size}, log buffer length=${logBuffer.length})`;
1818
- throw error;
1819
- }
1820
- while (timestamp < 1 && ++position < size);
1815
+ try {
1816
+ timestamp = dataView.getFloat64(position);
1817
+ } catch (error) {
1818
+ error.message += ` at position ${position} of log ${logBuffer.logId} (size=${size}, log buffer length=${logBuffer.length})`;
1819
+ throw error;
1820
+ }
1821
1821
  if (!timestamp) return {
1822
1822
  done: true,
1823
1823
  value: void 0
@@ -1908,7 +1908,7 @@ function loadLastPosition(transactionLog, readUncommitted) {
1908
1908
  //#region src/index.ts
1909
1909
  const versions = {
1910
1910
  rocksdb: version,
1911
- "rocksdb-js": "0.1.13"
1911
+ "rocksdb-js": "1.0.0"
1912
1912
  };
1913
1913
 
1914
1914
  //#endregion