NeonTransaction Class — drizzle-orm Architecture
Architecture documentation for the NeonTransaction class in session.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD a8071307_b057_551a_e19b_3468c2a65a87["NeonTransaction"] 8c075175_ed31_3ec7_952e_c0a6558abc34["session.ts"] a8071307_b057_551a_e19b_3468c2a65a87 -->|defined in| 8c075175_ed31_3ec7_952e_c0a6558abc34 8a88ac04_49b0_d2b0_fbeb_f331d8370331["transaction()"] a8071307_b057_551a_e19b_3468c2a65a87 -->|method| 8a88ac04_49b0_d2b0_fbeb_f331d8370331
Relationship Graph
Source Code
drizzle-orm/src/neon-http/session.ts lines 257–277
export class NeonTransaction<
TFullSchema extends Record<string, unknown>,
TSchema extends TablesRelationalConfig,
> extends PgTransaction<NeonHttpQueryResultHKT, TFullSchema, TSchema> {
static override readonly [entityKind]: string = 'NeonHttpTransaction';
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
Defined In
Source
Frequently Asked Questions
What is the NeonTransaction class?
NeonTransaction is a class in the drizzle-orm codebase, defined in drizzle-orm/src/neon-http/session.ts.
Where is NeonTransaction defined?
NeonTransaction is defined in drizzle-orm/src/neon-http/session.ts at line 257.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free