MySqlSmallInt Class — drizzle-orm Architecture
Architecture documentation for the MySqlSmallInt class in smallint.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 9f0f75ce_1cbd_d1e4_9172_6efa364d3d85["MySqlSmallInt"] 934915b8_8c53_b26e_e688_2445914177f2["smallint.ts"] 9f0f75ce_1cbd_d1e4_9172_6efa364d3d85 -->|defined in| 934915b8_8c53_b26e_e688_2445914177f2 9f644399_0561_912c_81a9_e3b0c481c50a["getSQLType()"] 9f0f75ce_1cbd_d1e4_9172_6efa364d3d85 -->|method| 9f644399_0561_912c_81a9_e3b0c481c50a 1165f217_2b44_7ff8_618c_48fda572ec08["mapFromDriverValue()"] 9f0f75ce_1cbd_d1e4_9172_6efa364d3d85 -->|method| 1165f217_2b44_7ff8_618c_48fda572ec08
Relationship Graph
Source Code
drizzle-orm/src/mysql-core/columns/smallint.ts lines 39–54
export class MySqlSmallInt<T extends ColumnBaseConfig<'number', 'MySqlSmallInt'>>
extends MySqlColumnWithAutoIncrement<T, MySqlIntConfig>
{
static override readonly [entityKind]: string = 'MySqlSmallInt';
getSQLType(): string {
return `smallint${this.config.unsigned ? ' unsigned' : ''}`;
}
override mapFromDriverValue(value: number | string): number {
if (typeof value === 'string') {
return Number(value);
}
return value;
}
}
Domain
Source
Frequently Asked Questions
What is the MySqlSmallInt class?
MySqlSmallInt is a class in the drizzle-orm codebase, defined in drizzle-orm/src/mysql-core/columns/smallint.ts.
Where is MySqlSmallInt defined?
MySqlSmallInt is defined in drizzle-orm/src/mysql-core/columns/smallint.ts at line 39.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free