NeonHttpDatabase Class — drizzle-orm Architecture
Architecture documentation for the NeonHttpDatabase class in driver.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD b6b337f5_bcc2_5e22_edc8_a716053cc396["NeonHttpDatabase"] a31a3294_138f_5fe3_66a6_78efb3064274["driver.ts"] b6b337f5_bcc2_5e22_edc8_a716053cc396 -->|defined in| a31a3294_138f_5fe3_66a6_78efb3064274 2db4716b_9688_9922_c6ec_1ea6772d014f["$withAuth()"] b6b337f5_bcc2_5e22_edc8_a716053cc396 -->|method| 2db4716b_9688_9922_c6ec_1ea6772d014f 5368b08b_74cf_5701_e75a_ed797652c063["batch()"] b6b337f5_bcc2_5e22_edc8_a716053cc396 -->|method| 5368b08b_74cf_5701_e75a_ed797652c063
Relationship Graph
Source Code
drizzle-orm/src/neon-http/driver.ts lines 80–122
export class NeonHttpDatabase<
TSchema extends Record<string, unknown> = Record<string, never>,
> extends PgDatabase<NeonHttpQueryResultHKT, TSchema> {
static override readonly [entityKind]: string = 'NeonHttpDatabase';
$withAuth(
token: Exclude<HTTPQueryOptions<true, true>['authToken'], undefined>,
): Omit<
this,
Exclude<
keyof this,
| '$count'
| 'delete'
| 'select'
| 'selectDistinct'
| 'selectDistinctOn'
| 'update'
| 'insert'
| 'with'
| 'query'
| 'execute'
| 'refreshMaterializedView'
>
> {
this.authToken = token;
return wrap(this, token, (target, p, res) => {
if (p === 'with') {
return wrap(res, token, (_, __, res) => res);
}
return res;
});
}
/** @internal */
declare readonly session: NeonHttpSession<TSchema, ExtractTablesWithRelations<TSchema>>;
async batch<U extends BatchItem<'pg'>, T extends Readonly<[U, ...U[]]>>(
batch: T,
): Promise<BatchResponse<T>> {
return this.session.batch(batch) as Promise<BatchResponse<T>>;
}
}
Domain
Defined In
Source
Frequently Asked Questions
What is the NeonHttpDatabase class?
NeonHttpDatabase is a class in the drizzle-orm codebase, defined in drizzle-orm/src/neon-http/driver.ts.
Where is NeonHttpDatabase defined?
NeonHttpDatabase is defined in drizzle-orm/src/neon-http/driver.ts at line 80.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free