open-truss / open-truss

MIT License
3 stars 1 forks source link

Postgres query engine #177

Open jonmagic opened 1 month ago

jonmagic commented 1 month ago

It looks like this is the main node postgres library: https://github.com/brianc/node-postgres

The idea is to use the streaming interface for whatever database client you are working with. It looks like there's a wrapper library to add async iterator support to node-postgres: https://github.com/vitaly-t/pg-iterator/blob/main/package.json

That package is using node-postgres 4.4.0 so at some point we'll probably want to figure out if we even need the wrapper project or we can build our own so we can always use the latest version of node-postgres without dependency hell. That can be deferred though.

There are lots of examples and docs for how to implement uqi clients:

This work should be done in the demo-app/src/lib folder for now and then later we'll extract all of the clients we've created into individual libraries once the dust has settled a bit.