db.batch is missing

Hello, so i am trying to send 2 db queries at once to reduce latency by reducing round trips to from the server to the db and for some reason the batch property is missing. I am using the latest version of drizzle as seen in my package.json. I have tried restarting my ts server and restarting my vscode but no luck. I am trying to follow the docs online but have no clue what else to try. Any help would be greatly appreciated, thankyou.
No description
No description
No description
7 Replies
Andrii Sherman
Andrii Sherman13mo ago
what driver are you using?
George
GeorgeOP13mo ago
@Andrew Sherman I am using the pg driver:
No description
George
GeorgeOP13mo ago
No description
Andrii Sherman
Andrii Sherman13mo ago
Drizzle ORM - next gen TypeScript ORM
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Andrii Sherman
Andrii Sherman13mo ago
you can use batch only for libsql and d1
No description
Andrii Sherman
Andrii Sherman13mo ago
which are both sqlite over http Postgres doesn't have batch api itself. But you can use Promise.all if you want to run queries in parallel
George
GeorgeOP13mo ago
Ohhh ok fair enough. Will this feature eventually be available for postgres. Also are there any differences / downsides for using Promise.all over db.batch. Sorry if this is a noobish question.
Want results from more Discord servers?
Add your server