Closed jotajunior closed 7 years ago
@jotajunior I like this idea a lot! Just a helper function of sorts for a single raw query that creates the connection, runs the query and returns the data?
Done. It'll be in the next release.
pushed to master and published to npm v0.1.4
Hello!
It seems like your library is mostly suited for connection pooling, which is understandable. But my (and many others') usecase is just a simple connection opening, query and closing (inside the callback).
Having to execute the query as a callback to the connect function is a major drawback, along with not having an instance factory, which is the case for most mature database drivers.
In this sense, I've developed something that made my life really easy, and maybe you can integrate.
It's just a Redshift object factory and an easy way to query directly:
This way, I can just call:
Without worrying about connecting, all the ugly nested callbacks and also tightly controlling the scope of my connection.
Since Redshift is widely used for analytics (and since you'll find people using Node.js just as way to serve a data collecting API), a lot of people may be in the need of just using simple, straightforward, and fast connection handling.
Hope it helps