drizzle-team / drizzle-team/drizzle-orm

[FEATURE]: Support the Batch API on the Neon adapter

Open
#1,802 2 comments 2 reactions 0 assignees View on GitHub
driver/neon enhancement qb/batch
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Describe what you want

In `@neondatabase/serverless` handle transactions like this

```ts
import { neon } from '@neondatabase/serverless';
const sql = neon(process.env.DATABASE_URL);
const showLatestN = 10;

const [posts, tags] = await sql.transaction([
sql`SELECT * FROM posts ORDER BY posted_at DESC LIMIT ${showLatestN}`,
sql`SELECT * FROM tags`,
]);
```

Currently, Drizzle does not support transactions on neon adapters. However, if Drizzle supports `batch` on neon, it can bridge this gap.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.