NeonHttpDriver Class — drizzle-orm Architecture
Architecture documentation for the NeonHttpDriver class in driver.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 180da515_18c5_736c_a538_c7bb8e47af02["NeonHttpDriver"] a31a3294_138f_5fe3_66a6_78efb3064274["driver.ts"] 180da515_18c5_736c_a538_c7bb8e47af02 -->|defined in| a31a3294_138f_5fe3_66a6_78efb3064274 09117629_83ca_2137_7916_094d5a8c372e["constructor()"] 180da515_18c5_736c_a538_c7bb8e47af02 -->|method| 09117629_83ca_2137_7916_094d5a8c372e 9790b2b7_cbde_3e69_866f_d233ccb4262d["createSession()"] 180da515_18c5_736c_a538_c7bb8e47af02 -->|method| 9790b2b7_cbde_3e69_866f_d233ccb4262d 609db509_462d_d6ed_4500_7ee72130b92a["initMappers()"] 180da515_18c5_736c_a538_c7bb8e47af02 -->|method| 609db509_462d_d6ed_4500_7ee72130b92a
Relationship Graph
Source Code
drizzle-orm/src/neon-http/driver.ts lines 20–51
export class NeonHttpDriver {
static readonly [entityKind]: string = 'NeonHttpDriver';
constructor(
private client: NeonHttpClient,
private dialect: PgDialect,
private options: NeonDriverOptions = {},
) {
this.initMappers();
}
createSession(
schema: RelationalSchemaConfig<TablesRelationalConfig> | undefined,
): NeonHttpSession<Record<string, unknown>, TablesRelationalConfig> {
return new NeonHttpSession(this.client, this.dialect, schema, {
logger: this.options.logger,
cache: this.options.cache,
});
}
initMappers() {
types.setTypeParser(types.builtins.TIMESTAMPTZ, (val) => val);
types.setTypeParser(types.builtins.TIMESTAMP, (val) => val);
types.setTypeParser(types.builtins.DATE, (val) => val);
types.setTypeParser(types.builtins.INTERVAL, (val) => val);
types.setTypeParser(1231, (val) => val);
types.setTypeParser(1115, (val) => val);
types.setTypeParser(1185, (val) => val);
types.setTypeParser(1187, (val) => val);
types.setTypeParser(1182, (val) => val);
}
}
Domain
Defined In
Source
Frequently Asked Questions
What is the NeonHttpDriver class?
NeonHttpDriver is a class in the drizzle-orm codebase, defined in drizzle-orm/src/neon-http/driver.ts.
Where is NeonHttpDriver defined?
NeonHttpDriver is defined in drizzle-orm/src/neon-http/driver.ts at line 20.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free