Home / Class/ MySqlSmallIntBuilder Class — drizzle-orm Architecture

MySqlSmallIntBuilder Class — drizzle-orm Architecture

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

Entity Profile

Dependency Diagram

graph TD
  776cb54b_5f03_be90_653c_af20998de4a2["MySqlSmallIntBuilder"]
  934915b8_8c53_b26e_e688_2445914177f2["smallint.ts"]
  776cb54b_5f03_be90_653c_af20998de4a2 -->|defined in| 934915b8_8c53_b26e_e688_2445914177f2
  1c8cff78_c6f9_11c4_39b9_cb43d583a88f["constructor()"]
  776cb54b_5f03_be90_653c_af20998de4a2 -->|method| 1c8cff78_c6f9_11c4_39b9_cb43d583a88f
  f3a905ea_17ed_5189_a78b_724ef251f59c["build()"]
  776cb54b_5f03_be90_653c_af20998de4a2 -->|method| f3a905ea_17ed_5189_a78b_724ef251f59c

Relationship Graph

Source Code

drizzle-orm/src/mysql-core/columns/smallint.ts lines 18–37

export class MySqlSmallIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlSmallInt'>>
	extends MySqlColumnBuilderWithAutoIncrement<T, MySqlIntConfig>
{
	static override readonly [entityKind]: string = 'MySqlSmallIntBuilder';

	constructor(name: T['name'], config?: MySqlIntConfig) {
		super(name, 'number', 'MySqlSmallInt');
		this.config.unsigned = config ? config.unsigned : false;
	}

	/** @internal */
	override build<TTableName extends string>(
		table: AnyMySqlTable<{ name: TTableName }>,
	): MySqlSmallInt<MakeColumnConfig<T, TTableName>> {
		return new MySqlSmallInt<MakeColumnConfig<T, TTableName>>(
			table,
			this.config as ColumnBuilderRuntimeConfig<any, any>,
		);
	}
}

Domain

Frequently Asked Questions

What is the MySqlSmallIntBuilder class?
MySqlSmallIntBuilder is a class in the drizzle-orm codebase, defined in drizzle-orm/src/mysql-core/columns/smallint.ts.
Where is MySqlSmallIntBuilder defined?
MySqlSmallIntBuilder is defined in drizzle-orm/src/mysql-core/columns/smallint.ts at line 18.

Analyze Your Own Codebase

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

Try Supermodel Free