Home / Class/ SingleStoreSmallInt Class — drizzle-orm Architecture

SingleStoreSmallInt Class — drizzle-orm Architecture

Architecture documentation for the SingleStoreSmallInt class in smallint.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  963cbd74_97f0_0927_2532_78bdb1275c13["SingleStoreSmallInt"]
  632f165f_0964_0c7d_8285_50b611e17db1["smallint.ts"]
  963cbd74_97f0_0927_2532_78bdb1275c13 -->|defined in| 632f165f_0964_0c7d_8285_50b611e17db1
  9e002e58_f116_3231_fada_ad63968d9dac["getSQLType()"]
  963cbd74_97f0_0927_2532_78bdb1275c13 -->|method| 9e002e58_f116_3231_fada_ad63968d9dac
  e79e6d68_f23a_2afa_cdd1_467050d1a7ad["mapFromDriverValue()"]
  963cbd74_97f0_0927_2532_78bdb1275c13 -->|method| e79e6d68_f23a_2afa_cdd1_467050d1a7ad

Relationship Graph

Source Code

drizzle-orm/src/singlestore-core/columns/smallint.ts lines 40–55

export class SingleStoreSmallInt<T extends ColumnBaseConfig<'number', 'SingleStoreSmallInt'>>
	extends SingleStoreColumnWithAutoIncrement<T, SingleStoreIntConfig>
{
	static override readonly [entityKind]: string = 'SingleStoreSmallInt';

	getSQLType(): string {
		return `smallint${this.config.unsigned ? ' unsigned' : ''}`;
	}

	override mapFromDriverValue(value: number | string): number {
		if (typeof value === 'string') {
			return Number(value);
		}
		return value;
	}
}

Domain

Frequently Asked Questions

What is the SingleStoreSmallInt class?
SingleStoreSmallInt is a class in the drizzle-orm codebase, defined in drizzle-orm/src/singlestore-core/columns/smallint.ts.
Where is SingleStoreSmallInt defined?
SingleStoreSmallInt is defined in drizzle-orm/src/singlestore-core/columns/smallint.ts at line 40.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free