DT
Drizzle Team•6mo ago
RaSk

rollback() not implemented for sqlite-core?

https://github.com/drizzle-team/drizzle-orm/blob/e922211fdbbd1218ac78440d8ded281a7f34b347/drizzle-orm/src/sqlite-core/session.ts#L223 If so, I would happily open a PR to provide a better error message than TransactionRollbackError [DrizzleError]: Rollback 😅
GitHub
drizzle-orm/drizzle-orm/src/sqlite-core/session.ts at e922211fdbbd1...
Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅 - drizzle-team/drizzle-orm
1 Reply
RaSk
RaSkOP•6mo ago
Context: Using turso + libsql-ts + drizzle-orm (versions below) Relevant callstack:
TransactionRollbackError [DrizzleError]: Rollback
at LibSQLTransaction.rollback (<redacted>/[email protected]_@[email protected]_@[email protected][email protected]/node_modules/drizzle-orm/sqlite-core/session.js:109:11)
<redacted>
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async LibSQLSession.transaction (<redacted>/[email protected]_@[email protected]_@[email protected][email protected]/node_modules/drizzle-orm/libsql/session.js:53:22)
TransactionRollbackError [DrizzleError]: Rollback
at LibSQLTransaction.rollback (<redacted>/[email protected]_@[email protected]_@[email protected][email protected]/node_modules/drizzle-orm/sqlite-core/session.js:109:11)
<redacted>
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async LibSQLSession.transaction (<redacted>/[email protected]_@[email protected]_@[email protected][email protected]/node_modules/drizzle-orm/libsql/session.js:53:22)
// TODO: support transaction behavior in libsql/session (link) 😅 or is it normal to throw errors on rollback? Nevermind I guess this is "normal" Implemented a try/catch with error instaceof TransactionRollbackError
Want results from more Discord servers?
Add your server