Socket
Socket
Sign inDemoInstall

lmdb

Package Overview
Dependencies
Maintainers
3
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lmdb - npm Package Compare versions

Comparing version 2.8.2 to 2.8.3

35

index.d.ts

@@ -301,3 +301,3 @@ declare namespace lmdb {

**/
openDB<OV = V, OK extends Key = K>(options: DatabaseOptions & { name: string }): Database<OV, OK>
openDB<OV = V, OK extends Key = K>(options?: DatabaseOptions & { name: string }): Database<OV, OK>
/**

@@ -330,6 +330,20 @@ * Open a database store using the provided options.

commitDelay?: number
/**
* This can be used to specify the initial amount of how much virtual memory address space (in bytes) to allocate for mapping to the database files.
* Setting a map size will typically disable remapChunks by default unless the size is larger than appropriate for the OS. Different OSes have different allocation limits.
**/
mapSize?: number
/**
* This defines the page size of the database. This defaults to the default page size of the OS (usually 4,096, except on MacOS with M-series, which is 16,384 bytes).
* You may want to consider setting this to 8,192 for databases larger than available memory (and moreso if you have range queries) or 4,096 for databases that can mostly cache in memory.
* Note that this only effects the page size of new databases (does not affect existing databases). */
pageSize?: number
/** This enables committing transactions where LMDB waits for a transaction to be fully flushed to disk after the transaction has been committed and defaults to being enabled on non-Windows OSes. This option is discussed in more detail below. */
overlappingSync?: boolean
/** Resolve asynchronous operations when commits are finished and visible and include a separate promise for when a commit is flushed to disk, as a flushed property on the commit promise. Note that you can alternately use the flushed property on the database. */
separateFlushed?: boolean
/**
* This a flag to specify if dynamic memory mapping should be used. Enabling this generally makes read operations a little bit slower, but frees up more mapped memory, making it friendlier to other applications.
* This is enabled by default on 32-bit operating systems (which require this to go beyond 4GB database size) if mapSize is not specified, otherwise it is disabled by default.
**/
remapChunks?: boolean

@@ -340,10 +354,27 @@ /** This provides a small performance boost (when not using useWritemap) for writes, by skipping zero'ing out malloc'ed data, but can leave application data in unused portions of the database. This is recommended unless there are concerns of database files being accessible. */

useWritemap?: boolean
/** Treat path as a filename instead of directory (this is the default if the path appears to end with an extension and has '.' in it) */
noSubdir?: boolean
/**
* Does not explicitly flush data to disk at all. This can be useful for temporary databases where durability/integrity is not necessary, and can significantly improve write performance that is I/O bound.
* However, we discourage this flag for data that needs integrity and durability in storage, since it can result in data loss/corruption if the computer crashes.
**/
noSync?: boolean
/** This isn't as dangerous as `noSync`, but doesn't improve performance much either. */
noMetaSync?: boolean
/** Self-descriptive */
readOnly?: boolean
/** The maximum number of concurrent read transactions (readers) to be able to open ([more information](http://www.lmdb.tech/doc/group__mdb.html#gae687966c24b790630be2a41573fe40e2)). */
maxReaders?: number
/** This enables encryption, and the provided value is the key that is used for encryption. This may be a buffer or string, but must be 32 bytes/characters long. This uses the Chacha8 cipher for fast and secure on-disk encryption of data. */
encryptionKey?: string | Buffer
/**
* This is enabled by default and will ensure that all asynchronous write operations performed in the same event turn will be batched together into the same transaction.
* Disabling this allows lmdb-js to commit a transaction at any time, and asynchronous operations will only be guaranteed to be in the same transaction if explicitly batched together (with transaction, batch, ifVersion).
* If this is disabled (set to false), you can control how many writes can occur before starting a transaction with txnStartThreshold (allow a transaction will still be started at the next event turn if the threshold is not met).
* Disabling event turn batching (and using lower txnStartThreshold values) can facilitate a faster response time to write operations. txnStartThreshold defaults to 5.
**/
eventTurnBatching?: boolean
}
interface RootDatabaseOptionsWithPath extends RootDatabaseOptions {
path: string
path?: string
}

@@ -350,0 +381,0 @@ interface CompressionOptions {

16

package.json
{
"name": "lmdb",
"author": "Kris Zyp",
"version": "2.8.2",
"version": "2.8.3",
"description": "Simple, efficient, scalable, high-performance LMDB interface",

@@ -84,3 +84,3 @@ "license": "MIT",

"node-gyp-build-optional-packages": "5.1.0",
"ordered-binary": "^1.4.0",
"ordered-binary": "^1.4.1",
"weak-lru-cache": "^1.2.2",

@@ -110,9 +110,9 @@ "yarn": "^1.22.19"

"optionalDependencies": {
"@lmdb/lmdb-darwin-arm64": "2.8.2",
"@lmdb/lmdb-darwin-x64": "2.8.2",
"@lmdb/lmdb-linux-arm": "2.8.2",
"@lmdb/lmdb-linux-arm64": "2.8.2",
"@lmdb/lmdb-linux-x64": "2.8.2",
"@lmdb/lmdb-win32-x64": "2.8.2"
"@lmdb/lmdb-darwin-arm64": "2.8.3",
"@lmdb/lmdb-darwin-x64": "2.8.3",
"@lmdb/lmdb-linux-arm": "2.8.3",
"@lmdb/lmdb-linux-arm64": "2.8.3",
"@lmdb/lmdb-linux-x64": "2.8.3",
"@lmdb/lmdb-win32-x64": "2.8.3"
}
}

@@ -737,4 +737,8 @@ import { RangeIterable } from './util/RangeIterable.js';

readTxn = null;
} else if (readTxn.address) {
resetTxn(readTxn.address);
} else {
resetTxn(readTxn.address);
console.warn('Attempt to reset an invalid read txn', readTxn);
readTxn = null;
throw new Error('Attempt to reset an invalid read txn');
}

@@ -741,0 +745,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc