Home / Function/ timestamp() — drizzle-orm Function Reference

timestamp() — drizzle-orm Function Reference

Architecture documentation for the timestamp() function in timestamp.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  7fea5ce2_836d_2ab8_305d_a02bfb667dbc["timestamp()"]
  3f4b2513_5741_1f8c_8c92_e76673d698a6["timestamp.ts"]
  7fea5ce2_836d_2ab8_305d_a02bfb667dbc -->|defined in| 3f4b2513_5741_1f8c_8c92_e76673d698a6
  style 7fea5ce2_836d_2ab8_305d_a02bfb667dbc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/mysql-core/columns/timestamp.ts lines 119–125

export function timestamp(a?: string | MySqlTimestampConfig, b: MySqlTimestampConfig = {}) {
	const { name, config } = getColumnNameAndConfig<MySqlTimestampConfig | undefined>(a, b);
	if (config?.mode === 'string') {
		return new MySqlTimestampStringBuilder(name, config);
	}
	return new MySqlTimestampBuilder(name, config);
}

Domain

Subdomains

Frequently Asked Questions

What does timestamp() do?
timestamp() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/mysql-core/columns/timestamp.ts.
Where is timestamp() defined?
timestamp() is defined in drizzle-orm/src/mysql-core/columns/timestamp.ts at line 119.

Analyze Your Own Codebase

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

Try Supermodel Free