constructor() — drizzle-orm Function Reference
Architecture documentation for the constructor() function in session.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD fe48f394_88e3_d209_0804_2a2936e7d214["constructor()"] e2c50c8d_fb7d_d417_0322_22c93324dfc6["VercelPgPreparedQuery"] fe48f394_88e3_d209_0804_2a2936e7d214 -->|defined in| e2c50c8d_fb7d_d417_0322_22c93324dfc6 04ed5455_b56a_2a80_2dfc_cead2451a9a4["constructor()"] 04ed5455_b56a_2a80_2dfc_cead2451a9a4 -->|calls| fe48f394_88e3_d209_0804_2a2936e7d214 04ed5455_b56a_2a80_2dfc_cead2451a9a4["constructor()"] fe48f394_88e3_d209_0804_2a2936e7d214 -->|calls| 04ed5455_b56a_2a80_2dfc_cead2451a9a4 style fe48f394_88e3_d209_0804_2a2936e7d214 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/vercel-postgres/session.ts lines 32–136
constructor(
private client: VercelPgClient,
queryString: string,
private params: unknown[],
private logger: Logger,
cache: Cache,
queryMetadata: {
type: 'select' | 'update' | 'delete' | 'insert';
tables: string[];
} | undefined,
cacheConfig: WithCacheConfig | undefined,
private fields: SelectedFieldsOrdered | undefined,
name: string | undefined,
private _isResponseInArrayMode: boolean,
private customResultMapper?: (rows: unknown[][]) => T['execute'],
) {
super({ sql: queryString, params }, cache, queryMetadata, cacheConfig);
this.rawQuery = {
name,
text: queryString,
types: {
// @ts-ignore
getTypeParser: (typeId, format) => {
if (typeId === types.builtins.TIMESTAMPTZ) {
return (val: any) => val;
}
if (typeId === types.builtins.TIMESTAMP) {
return (val: any) => val;
}
if (typeId === types.builtins.DATE) {
return (val: any) => val;
}
if (typeId === types.builtins.INTERVAL) {
return (val: any) => val;
}
// numeric[]
if (typeId === 1231 as any) {
return (val: any) => val;
}
// timestamp[]
if (typeId === 1115 as any) {
return (val: any) => val;
}
// timestamp with timezone[]
if (typeId === 1185 as any) {
return (val: any) => val;
}
// interval[]
if (typeId === 1187 as any) {
return (val: any) => val;
}
// date[]
if (typeId === 1182 as any) {
return (val: any) => val;
}
// @ts-ignore
return types.getTypeParser(typeId, format);
},
},
};
this.queryConfig = {
name,
text: queryString,
rowMode: 'array',
types: {
// @ts-ignore
getTypeParser: (typeId, format) => {
if (typeId === types.builtins.TIMESTAMPTZ) {
return (val: any) => val;
}
if (typeId === types.builtins.TIMESTAMP) {
return (val: any) => val;
}
if (typeId === types.builtins.DATE) {
return (val: any) => val;
}
if (typeId === types.builtins.INTERVAL) {
return (val: any) => val;
}
// numeric[]
if (typeId === 1231 as any) {
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does constructor() do?
constructor() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/vercel-postgres/session.ts.
Where is constructor() defined?
constructor() is defined in drizzle-orm/src/vercel-postgres/session.ts at line 32.
What does constructor() call?
constructor() calls 1 function(s): constructor.
What calls constructor()?
constructor() is called by 1 function(s): constructor.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free