drizzle-team / drizzle-team/drizzle-orm

[BUG]:The better-sqlite3 driver throws an error when using transactions.

Open
#5,063 3 comments 1 reaction 0 assignees View on GitHub
docs docs/undocumented
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Report hasn't been filed before.

- [x] I have verified that the bug I'm about to report hasn't been filed before.

### What version of `drizzle-orm` are you using?

0.44.7

### What version of `drizzle-kit` are you using?

0.31.7

### Other packages

better-sqlite3@v12.1.0

### Describe the Bug

-What is the undesired behavior?
get error
-What are the steps to reproduce it?
`
await db.transaction(async (tx) => {
const [rowUser] = await tx.inser(users).valus({name: 'foo'}).returning({id: users.id})
await inser(userCredentials).values({userId: rowUser.id})

// cmd: Transaction function cannot return a promise
}
`
-What is the desired result?
no error
-What database engine are you using? Are you using a specific cloud provider? Which one?
drive: better-sqlite3, db: sqlite3
-Do you think this bug pertains to a specific database driver? Which one?
yes. better-sqlite3(this is a sync drive)
-Are you working in a monorepo?
yes.
-If you're using a runtime that isn't Node.js: Which one? What version? Have you verified that this isn't an issue with the runtime itself?
Nothing to do with Node.js

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.