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

numeric() — drizzle-orm Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  d28b7d19_5bf1_c039_a880_794b8dab622e["numeric()"]
  c5af0e66_056b_2390_c3e9_ff89afff460c["numeric.ts"]
  d28b7d19_5bf1_c039_a880_794b8dab622e -->|defined in| c5af0e66_056b_2390_c3e9_ff89afff460c
  style d28b7d19_5bf1_c039_a880_794b8dab622e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/sqlite-core/columns/numeric.ts lines 152–160

export function numeric(a?: string | SQLiteNumericConfig, b?: SQLiteNumericConfig) {
	const { name, config } = getColumnNameAndConfig<SQLiteNumericConfig>(a, b);
	const mode = config?.mode;
	return mode === 'number'
		? new SQLiteNumericNumberBuilder(name)
		: mode === 'bigint'
		? new SQLiteNumericBigIntBuilder(name)
		: new SQLiteNumericBuilder(name);
}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free