transaction() — drizzle-orm Function Reference
Architecture documentation for the transaction() function in session.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 1e126342_9684_fcfd_18cd_279e69bb344e["transaction()"] 18fe486b_5392_f4c4_8c3d_3eb546c2467b["NeonTransaction"] 1e126342_9684_fcfd_18cd_279e69bb344e -->|defined in| 18fe486b_5392_f4c4_8c3d_3eb546c2467b f5f9d844_b54a_1a02_474b_a4a2413a7ecd["execute()"] 1e126342_9684_fcfd_18cd_279e69bb344e -->|calls| f5f9d844_b54a_1a02_474b_a4a2413a7ecd b60c7e75_3b03_7b64_59b4_39d41ce90192["transaction()"] 1e126342_9684_fcfd_18cd_279e69bb344e -->|calls| b60c7e75_3b03_7b64_59b4_39d41ce90192 style 1e126342_9684_fcfd_18cd_279e69bb344e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/neon-http/session.ts lines 263–276
override async transaction<T>(_transaction: (tx: NeonTransaction<TFullSchema, TSchema>) => Promise<T>): Promise<T> {
throw new Error('No transactions support in neon-http driver');
// const savepointName = `sp${this.nestedIndex + 1}`;
// const tx = new NeonTransaction(this.dialect, this.session, this.schema, this.nestedIndex + 1);
// await tx.execute(sql.raw(`savepoint ${savepointName}`));
// try {
// const result = await transaction(tx);
// await tx.execute(sql.raw(`release savepoint ${savepointName}`));
// return result;
// } catch (e) {
// await tx.execute(sql.raw(`rollback to savepoint ${savepointName}`));
// throw e;
// }
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does transaction() do?
transaction() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/neon-http/session.ts.
Where is transaction() defined?
transaction() is defined in drizzle-orm/src/neon-http/session.ts at line 263.
What does transaction() call?
transaction() calls 2 function(s): execute, transaction.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free