Comparing version 2.4.1 to 2.4.2
{ | ||
"name": "lmdb", | ||
"author": "Kris Zyp", | ||
"version": "2.4.1", | ||
"version": "2.4.2", | ||
"description": "Simple, efficient, scalable, high-performance LMDB interface", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -183,9 +183,8 @@ import { RangeIterable } from './util/RangeIterable.js'; | ||
if (versionOrValue == null) { | ||
this.getBinaryFast(key); | ||
// undefined means the entry exists, null is used specifically to check for the entry *not* existing | ||
return (this.lastSize === 0xffffffff) == (versionOrValue === null); | ||
return (this.getBinaryFast(key) === undefined) == (versionOrValue === null); | ||
} | ||
else if (this.useVersions) { | ||
this.getBinaryFast(key); | ||
return this.lastSize !== 0xffffffff && getLastVersion() === versionOrValue; | ||
return this.getBinaryFast(key) !== undefined && getLastVersion() === versionOrValue; | ||
} | ||
@@ -458,3 +457,3 @@ else { | ||
this.lastSize = this.keyIsCompatibility ? txn.getBinaryShared(id) : this.db.get(this.writeKey(id, keyBytes, 0)); | ||
if (this.lastSize === 0xffffffff) { // not found code | ||
if (this.lastSize === -30798) { // not found code | ||
return; //undefined | ||
@@ -461,0 +460,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
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
2324318
5503