-
Notifications
You must be signed in to change notification settings - Fork 52
Description
I was processing a pretty big dataset the other day, and naturally was feeling pretty grateful that Model supports streaming results, until der_On and I discovered:
The PG Adapter Only Fakes Streaming!
It inherits from EventedQueryProcessor, which inherits from an EventEmitter, and only fakes a Stream object, but without the critical back-pressure handling and memory-efficiency of actual streams!
You can see an example of how this is presently implemented here.
One good reason this may have been done originally, is that the core PG module does not support streams.
Fortunately, there is a module, node-pg-query-stream that does exactly what we need here.
I'm adding this issue to help guide efforts at adding proper streaming to the PG adapter, and am going to be taking a shot myself, although this will definitely be the deepest I've ever delved into Model, so no promises! (Only callbacks)
