Closed elderapo closed 2 years ago
This would be a nice feature. If you start implementing this, remember that Kysely has zero dependencies. You can't refer to any libraries inside kysely code or even to any typing packages. That means all needed libraries and modules need to be provided through Dialect
constructors just like the pool
is provided now.
Since most users won't use this feature, they don't want to install extra dependencies for this, so all extra deps provided through the dialect constructors need to be optional.
Other hints: You probably want to add another method for the DatabaseConnection
interface. Something like createQueryStream
Already mentioned in the discord channel. Basically something like this:
I think async iterators provide a cleaner API for this case than node streams.
Some links that could help with internal implementation: