Home / Class/ MySqlTimestampBuilder Class — drizzle-orm Architecture

MySqlTimestampBuilder Class — drizzle-orm Architecture

Architecture documentation for the MySqlTimestampBuilder class in timestamp.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  dc873c7f_852d_4b51_72e1_023c109f06d1["MySqlTimestampBuilder"]
  3f4b2513_5741_1f8c_8c92_e76673d698a6["timestamp.ts"]
  dc873c7f_852d_4b51_72e1_023c109f06d1 -->|defined in| 3f4b2513_5741_1f8c_8c92_e76673d698a6
  5203e755_5338_184c_1d3a_632dfe89e0cc["constructor()"]
  dc873c7f_852d_4b51_72e1_023c109f06d1 -->|method| 5203e755_5338_184c_1d3a_632dfe89e0cc
  5a630fe2_c1a3_629f_2a96_b6c138f5ac5e["build()"]
  dc873c7f_852d_4b51_72e1_023c109f06d1 -->|method| 5a630fe2_c1a3_629f_2a96_b6c138f5ac5e

Relationship Graph

Source Code

drizzle-orm/src/mysql-core/columns/timestamp.ts lines 17–36

export class MySqlTimestampBuilder<T extends ColumnBuilderBaseConfig<'date', 'MySqlTimestamp'>>
	extends MySqlDateColumnBaseBuilder<T, MySqlTimestampConfig>
{
	static override readonly [entityKind]: string = 'MySqlTimestampBuilder';

	constructor(name: T['name'], config: MySqlTimestampConfig | undefined) {
		super(name, 'date', 'MySqlTimestamp');
		this.config.fsp = config?.fsp;
	}

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

Domain

Frequently Asked Questions

What is the MySqlTimestampBuilder class?
MySqlTimestampBuilder is a class in the drizzle-orm codebase, defined in drizzle-orm/src/mysql-core/columns/timestamp.ts.
Where is MySqlTimestampBuilder defined?
MySqlTimestampBuilder is defined in drizzle-orm/src/mysql-core/columns/timestamp.ts at line 17.

Analyze Your Own Codebase

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

Try Supermodel Free