@harperfast/rocksdb-js 0.1.14 → 1.0.1

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.d.mts CHANGED
@@ -528,6 +528,7 @@ declare const NativeTransaction: NativeTransaction;
528
528
  declare const TransactionLog: TransactionLog;
529
529
  declare const registryStatus: () => RegistryStatus;
530
530
  declare const shutdown: () => void;
531
+ declare const currentThreadId: () => number;
531
532
  declare const stats: {
532
533
  histograms: string[];
533
534
  tickers: string[];
@@ -1245,5 +1246,5 @@ declare const versions: {
1245
1246
  "rocksdb-js": string;
1246
1247
  };
1247
1248
  //#endregion
1248
- export { DBI, DBIterator, type IteratorOptions, type Key, RocksDatabase, type RocksDatabaseOptions, type StatsHistogramData, Store, type StoreContext, type StoreGetOptions, type StoreIteratorOptions, type StorePutOptions, type StoreRangeOptions, type StoreRemoveOptions, Transaction, type TransactionEntry, TransactionLog, constants, parseTransactionLog, registryStatus, shutdown, stats, versions };
1249
+ export { DBI, DBIterator, type IteratorOptions, type Key, RocksDatabase, type RocksDatabaseOptions, type StatsHistogramData, Store, type StoreContext, type StoreGetOptions, type StoreIteratorOptions, type StorePutOptions, type StoreRangeOptions, type StoreRemoveOptions, Transaction, type TransactionEntry, TransactionLog, constants, currentThreadId, parseTransactionLog, registryStatus, shutdown, stats, versions };
1249
1250
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -62,6 +62,7 @@ const NativeTransaction = binding.Transaction;
62
62
  const TransactionLog = binding.TransactionLog;
63
63
  const registryStatus = binding.registryStatus;
64
64
  const shutdown = binding.shutdown;
65
+ const currentThreadId = binding.currentThreadId;
65
66
  const stats = binding.stats;
66
67
  const version = binding.version;
67
68
 
@@ -1787,14 +1788,12 @@ Object.defineProperty(TransactionLog.prototype, "query", { value({ start, end, e
1787
1788
  }
1788
1789
  }
1789
1790
  while (position < size) {
1790
- do
1791
- try {
1792
- timestamp = dataView.getFloat64(position);
1793
- } catch (error) {
1794
- error.message += ` at position ${position} of log ${logBuffer.logId} (size=${size}, log buffer length=${logBuffer.length})`;
1795
- throw error;
1796
- }
1797
- while (timestamp < 1 && ++position < size);
1791
+ try {
1792
+ timestamp = dataView.getFloat64(position);
1793
+ } catch (error) {
1794
+ error.message += ` at position ${position} of log ${logBuffer.logId} (size=${size}, log buffer length=${logBuffer.length})`;
1795
+ throw error;
1796
+ }
1798
1797
  if (!timestamp) return {
1799
1798
  done: true,
1800
1799
  value: void 0
@@ -1885,9 +1884,9 @@ function loadLastPosition(transactionLog, readUncommitted) {
1885
1884
  //#region src/index.ts
1886
1885
  const versions = {
1887
1886
  rocksdb: version,
1888
- "rocksdb-js": "0.1.14"
1887
+ "rocksdb-js": "1.0.1"
1889
1888
  };
1890
1889
 
1891
1890
  //#endregion
1892
- export { DBI, DBIterator, RocksDatabase, Store, Transaction, TransactionLog, constants, parseTransactionLog, registryStatus, shutdown, stats, versions };
1891
+ export { DBI, DBIterator, RocksDatabase, Store, Transaction, TransactionLog, constants, currentThreadId, parseTransactionLog, registryStatus, shutdown, stats, versions };
1893
1892
  //# sourceMappingURL=index.mjs.map