Skip to content

getAsync silent crash #340

@underflow00

Description

@underflow00

The simplest use of getAsync causes the program to crash silently when the key doesn't exist

(async () => {
  let rootDb = lmdb.open({
      path: './lmdb-test/db2',
      mapSize: 1024 * 1024 * 1024,
      maxDbs: 10,
      keyEncoding: 'binary',
      encoding: 'binary',
  });
  const value = await rootDb.getAsync(Buffer.from('key1'));
  console.log('done'); // Never executed
})();

Separately, the TypeScript type is also incorrect as it's a single value not an array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions