Home / Class/ SingleStoreTimestampBuilder Class — drizzle-orm Architecture

SingleStoreTimestampBuilder Class — drizzle-orm Architecture

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

Entity Profile

Dependency Diagram

graph TD
  1a08b195_9740_2dd4_5051_fcde891f3938["SingleStoreTimestampBuilder"]
  d7e3f6c1_5cc9_da57_bb08_4c22eb83ae0a["timestamp.ts"]
  1a08b195_9740_2dd4_5051_fcde891f3938 -->|defined in| d7e3f6c1_5cc9_da57_bb08_4c22eb83ae0a
  7de90ec6_1f40_af2a_3a29_639adec80cce["constructor()"]
  1a08b195_9740_2dd4_5051_fcde891f3938 -->|method| 7de90ec6_1f40_af2a_3a29_639adec80cce
  74696bb6_663d_0123_caae_1347d6b14234["build()"]
  1a08b195_9740_2dd4_5051_fcde891f3938 -->|method| 74696bb6_663d_0123_caae_1347d6b14234
  8cfa42e8_dd04_2635_aa2e_e912dc085ebe["defaultNow()"]
  1a08b195_9740_2dd4_5051_fcde891f3938 -->|method| 8cfa42e8_dd04_2635_aa2e_e912dc085ebe

Relationship Graph

Source Code

drizzle-orm/src/singlestore-core/columns/timestamp.ts lines 19–41

export class SingleStoreTimestampBuilder<T extends ColumnBuilderBaseConfig<'date', 'SingleStoreTimestamp'>>
	extends SingleStoreDateColumnBaseBuilder<T, SingleStoreTimestampConfig>
{
	static override readonly [entityKind]: string = 'SingleStoreTimestampBuilder';

	constructor(name: T['name']) {
		super(name, 'date', 'SingleStoreTimestamp');
	}

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

	override defaultNow() {
		return this.default(sql`CURRENT_TIMESTAMP`);
	}
}

Domain

Frequently Asked Questions

What is the SingleStoreTimestampBuilder class?
SingleStoreTimestampBuilder is a class in the drizzle-orm codebase, defined in drizzle-orm/src/singlestore-core/columns/timestamp.ts.
Where is SingleStoreTimestampBuilder defined?
SingleStoreTimestampBuilder is defined in drizzle-orm/src/singlestore-core/columns/timestamp.ts at line 19.

Analyze Your Own Codebase

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

Try Supermodel Free