Releases: kriszyp/lmdb-js
Improved reader lock handling and TypeScript definitions
This version includes improvements for checking reader locks, cleaning up stale reader locks. It also provides an option for whether or not to use a reader lock-based snapshot for iterators (can be disabled for long-running iterators).
This version includes more expansive TypeScript definitions.
Support for duplicate key databases (dupSort)
This release includes more comprehensive support for interacting with duplicate key databases (which are enabled with dupSort
flag):
remove
/removeSync
now support specifying a value as the second argument for deleting individual entries that may share a duplicate keygetValues(key)
was added to iterate over all values of a given keygetKeys(rangeOptions)
was added to easily iterate over all keys in a range, without returning duplicate keys
Upgraded getRange/query and type definitions
Caching is now available, and can be enabled with the cache
flag. This uses a weak-referenced based LRFU cache that can improve performance, guarantee key correlation with object identity, and provide immediate access to put
values.
The getRange function for traversing over a range of keys now uses a true snapshot-based cursor to traverse the entire range. Previously, getRange would get blocks of 100 entries and reset the cursor between retrievals so it wasn't truly snapshot based, but now getRange should return a range of entries based on the exact snapshot/state of the database at the time when it was called.
We have also improved the TypeScript type definitions and added a test for them.
Encryption Support
lmdb-store now includes support for on-disk encryption. This is enabled by using the new encryptionKey
option/property, and specifying a key to use for encryption. lmdb-store encrypts using the Chacha8 cipher, which provides a very high performance means of encrypting a database (this is the only type of encryption currently supported).
Upgrade to LMDB Version 1.0
This major version update includes an update to LMDB 1.0, which has incompatible database format with LMDB 0.9.x. This release includes an automated upgrade when opening a LMDB 0.9.x database and attempts to upgrade the database to LMDB 1.0 (by copying all the records from the older format to newer format). This involves the use of the lmdb-store-0.9 package to handle reading from the old format. In the future, this package will not be included, and upgrade will require explicitly including that package.
TS Type Definitions and Better free-space management
lmdb-store now includes type definitions for TypeScript. This release also imposes a maximum search for free-space in LMDB to better handle databases with large fragment free spaces.