PgSmallInt Class — drizzle-orm Architecture
Architecture documentation for the PgSmallInt class in smallint.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 81743d64_34c2_2cb3_ab93_979234789ad3["PgSmallInt"] 1efe7a66_e4ac_9b00_b7f9_c6b0047ae0f8["smallint.ts"] 81743d64_34c2_2cb3_ab93_979234789ad3 -->|defined in| 1efe7a66_e4ac_9b00_b7f9_c6b0047ae0f8 fcaf4268_ba68_30e4_14eb_c87781fd243b["getSQLType()"] 81743d64_34c2_2cb3_ab93_979234789ad3 -->|method| fcaf4268_ba68_30e4_14eb_c87781fd243b
Relationship Graph
Source Code
drizzle-orm/src/pg-core/columns/smallint.ts lines 34–47
export class PgSmallInt<T extends ColumnBaseConfig<'number', 'PgSmallInt'>> extends PgColumn<T> {
static override readonly [entityKind]: string = 'PgSmallInt';
getSQLType(): string {
return 'smallint';
}
override mapFromDriverValue = (value: number | string): number => {
if (typeof value === 'string') {
return Number(value);
}
return value;
};
}
Domain
Defined In
Source
Frequently Asked Questions
What is the PgSmallInt class?
PgSmallInt is a class in the drizzle-orm codebase, defined in drizzle-orm/src/pg-core/columns/smallint.ts.
Where is PgSmallInt defined?
PgSmallInt is defined in drizzle-orm/src/pg-core/columns/smallint.ts at line 34.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free