Open kennylbj opened 2 years ago
Hello, did you solve the problem? I'm having the same situation.
@SuiKaSan According to this document , the iterator function is needed to be defined in order to iterate over the dataset. It seems that the keyv-file did miss this part.
+1
Created a pull request for this feature. Hoping for support to get iterators for keyv-file released. :smiley: It's just so nice for devs to develop locally against some files in stead of having to start a docker-ized memory eating db.
Tested the iterator here in a actual project and had to do a bugfix. #22 When merged we can close this ticket as solved.
for await (const [key, value] of this.store.iterator()) {
console.log(key, value);
};
const myIterator = this.store.iterator();
console.log(await myIterator.next());
console.log(await myIterator.next());
I tried by following code but return error:
Is that because the iterator function needs to be defined in keyv-file?