I want Drift querying, but for my Node.js server #3076
frankvollebregt
started this conversation in
General
Replies: 1 comment 1 reply
-
Well obviously you should be using dart2js to run your Dart app in node.js /s Compiled queries in drift are pretty closely linked to other features of drift (e.g. companions for inserts or other placeholders like in |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey! This is only tangentially related to Drift itself, but who knows: someone here might have some ideas 🙂
I am working on a Node.js Typescript web server using Nest.js, which talks to a Postgres database (using a database
Pool
from thepg
package) and provides data through a REST API and in the future also through websockets (hopefully).What I really like about Drift (well almost everything, but specifically) is how I can use my queries written in SQL, and use the
build_runner
to generate fully typed functions from them, so that I can call them and access the results with IDE hints etc.Is anyone aware of an NPM package that can achieve something similar? Where I can somehow generate Typescript code based on my SQL queries and database definition, after which I can call my queries as functions and access the result as full Typescript classes?
Any input or pointers are appreciated 😄
Beta Was this translation helpful? Give feedback.
All reactions