kriszyp / lmdb-js

Simple, efficient, ultra-fast, scalable data store wrapper for LMDB
Other
482 stars 39 forks source link

Invalid method result: doesExist() should return false if key does not exists #169

Closed sebastijankuzner closed 2 years ago

sebastijankuzner commented 2 years ago

DoesExist returns invalid value since version 2.3.0. It should return false for non existing keys.

    const db = lmdb.open({
        path: "test",
        compression: true
    })

    console.log(db.doesExist("key"))

    await db.put("key", "value")

    console.log(db.doesExist("key"))

Output:

true
true

Expected output:

false
true
kriszyp commented 2 years ago

Thank you for the clear report! Should be fixed in v2.4.2.