Is it possible to create a query without having a (postgres) db instance?
I can do this:
But is there anyway to do something like this:
It seems if I manually define the query like in the good old days I can pre-write a query ahead of time.
But if I want to access the type-safe universe, it looks like I need to have a db instance set up BEFORE I use it to compose the query.
I have a use case where I'd like to prewrite several queries for a query catalog.
This catalog is built before the db object is instantiated.
1 Reply
You might want to take a look at this: https://orm.drizzle.team/docs/goodies#standalone-query-builder
Drizzle ORM - Goodies
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.