-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with abstract-level v.2.0.0? #17
Comments
Are you specifically looking to read multiple entries at once (in which case I'd recommend
|
Hey! Thank for the REALLY quick reply! If my memory serves me well, we are pumping GeoJSON through streams to OpenLayers. I sort of like streams because of, well the streaming. Meaning async, buffered, lots of time for event loop to do other stuff, back-pressure handing and so on. I try to put some simple "DelegatingLevel" or something together which might hopefully expose the problem. Usually that's the time I recognize what's wrong with MY code ;-) |
I put together a little something: https://github.com/dehmer/cb46bd75 In the first skipped test case EntryStream is piped to a Writable. Thanks for your interest and time for helping me out! |
Ah, |
OK. Just what I thought. No worries! Thanks for the confirmation. 👍 From your PR I deduce that you plan to support both, callback and promise, APIs with the upcoming version. I will have a look at BTW: Node 12, 14 and 16 are end-of-life. Maybe you could update the actions/checks accordingly. |
Yeah, I considered it. The complexity is worth it because |
I wasn't even aware that memory-level and classic-level still have to adopt the promise API. Thank you very much for the smooth collaboration and clarification. |
TL;DR: Is
level-read-stream
v1.1.0 compatible withabstract-level
v.2.0.0? If not, is there a similar package which supports Node Streams and is compatible withabstract-level
v.2.0.0?I'm trying to migrate a project to current Level-APIs. The project heavily uses Level (native) for different aspects under Node.js/Electron (with node integration enabled). Besides other stuff, I have a class extending
AbstractLevel
with an iterator extendingAbstractIterator
. This class basically uses two sublevels with different value encodings (JSON and Well-known Binar, WKB) to split and merge data between these two sublevels based on same keys.The implementation is based on the v2.0.0
abstract-level
(Promise) API. TheAbstractLevel
part works like a charm.AbstractIterator
when combined withlevel-read-stream
does more or less nothing.EntryStream
seems not to emit any event for the following code:I tried to debug the code for Node.js, but came to no definitive conclusion. It seems that the "handoff" to
Readable
somehow fails. The iterator itself is producing the correct output for_next()
.Good news! Working code ahead:
So the iterator code might not be broken after all.
If you think that
level-read-stream
v1.1.0 is indeed compatible with currentabstract-level
then I happily patch together a minimal repository which demonstrates the issue. In the meantime I'll try to go withfor await
.Thanks for your attention and all the good work you put into the Level ecosystem.
The text was updated successfully, but these errors were encountered: