Level / community

Discussion, support and common information for projects in the community.
MIT License
43 stars 15 forks source link

How to fetch all records written so far to the ldb #73

Closed dexterity2k16 closed 5 years ago

dexterity2k16 commented 5 years ago

I want to fetch all records written to the ldb file. I tried db.get, createReadStream, nothing seems to work. They just return the latest value.

juliangruber commented 5 years ago

Does this work for you?

db.createReadStream().on('data', ({ key, value }) => console.log({ key, value }))