Comparing version 3.1.0 to 3.1.1
@@ -62,2 +62,9 @@ declare namespace lmdb { | ||
/** | ||
* @experimental Asynchronously get a value by id. | ||
* @param ids | ||
* @param callback | ||
*/ | ||
getAsync(id: K, options?: GetOptions, callback?: (value: V) => any): Promise<(V | undefined)[]> | ||
/** | ||
* Store the provided value, using the provided id/key | ||
@@ -443,2 +450,3 @@ * @param id The key for the entry | ||
forEach(callback: (entry: T) => any): void | ||
mapError<U>(callback: (error: Error) => U): RangeIterable<U> | ||
onDone?: Function | ||
@@ -445,0 +453,0 @@ asArray: T[] |
{ | ||
"name": "lmdb", | ||
"author": "Kris Zyp", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Simple, efficient, scalable, high-performance LMDB interface", | ||
@@ -114,9 +114,9 @@ "license": "MIT", | ||
"optionalDependencies": { | ||
"@lmdb/lmdb-darwin-arm64": "3.1.0", | ||
"@lmdb/lmdb-darwin-x64": "3.1.0", | ||
"@lmdb/lmdb-linux-arm": "3.1.0", | ||
"@lmdb/lmdb-linux-arm64": "3.1.0", | ||
"@lmdb/lmdb-linux-x64": "3.1.0", | ||
"@lmdb/lmdb-win32-x64": "3.1.0" | ||
"@lmdb/lmdb-darwin-arm64": "3.1.1", | ||
"@lmdb/lmdb-darwin-x64": "3.1.1", | ||
"@lmdb/lmdb-linux-arm": "3.1.1", | ||
"@lmdb/lmdb-linux-arm64": "3.1.1", | ||
"@lmdb/lmdb-linux-x64": "3.1.1", | ||
"@lmdb/lmdb-win32-x64": "3.1.1" | ||
} | ||
} |
@@ -821,3 +821,3 @@ import { RangeIterable } from './util/RangeIterable.js'; | ||
// this is an asynchronous get for multiple keys. It actually works by prefetching asynchronously, | ||
// allowing a separate to absorb the potentially largest cost: hard page faults (and disk I/O). | ||
// allowing a separate thread/task to absorb the potentially largest cost: hard page faults (and disk I/O). | ||
// And then we just do standard sync gets (to deserialized data) to fulfil the callback/promise | ||
@@ -824,0 +824,0 @@ // once the prefetch occurs |
@@ -89,8 +89,8 @@ export const SKIP = {}; | ||
} catch (error) { | ||
if (iterable.mapError) { | ||
// if we have mapError, we can use it to further handle errors | ||
if (iterable.handleError) { | ||
// if we have handleError, we can use it to further handle errors | ||
try { | ||
result = iterable.mapError(error, i); | ||
} catch (mapError) { | ||
return this.throw(mapError); | ||
result = iterable.handleError(error, i); | ||
} catch (error2) { | ||
return this.throw(error2); | ||
} | ||
@@ -216,3 +216,3 @@ } else return this.throw(error); | ||
if (result.then) { | ||
if (!async) | ||
if (!options.async) | ||
throw new Error( | ||
@@ -360,3 +360,3 @@ 'Can not synchronously iterate with promises as iterator results', | ||
}); | ||
iterable.mapError = (error, i) => { | ||
iterable.handleError = (error, i) => { | ||
if (i < start) return SKIP; | ||
@@ -370,3 +370,3 @@ if (i >= end) { | ||
} | ||
mapCatch(catch_callback) { | ||
mapError(catch_callback) { | ||
let iterable = this.map((element) => { | ||
@@ -373,0 +373,0 @@ return element; |
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 too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2529537
7884