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

getSQLType() — drizzle-orm Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  b0265ed6_fb37_a93f_63de_76fb50a4f06c["getSQLType()"]
  a3802a4b_5906_4e46_8751_a5aee36db535["MySqlFloat"]
  b0265ed6_fb37_a93f_63de_76fb50a4f06c -->|defined in| a3802a4b_5906_4e46_8751_a5aee36db535
  73a208a8_e9bb_e54a_d3cf_45e95189f2e8["float()"]
  b0265ed6_fb37_a93f_63de_76fb50a4f06c -->|calls| 73a208a8_e9bb_e54a_d3cf_45e95189f2e8
  style b0265ed6_fb37_a93f_63de_76fb50a4f06c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/mysql-core/columns/float.ts lines 46–56

	getSQLType(): string {
		let type = '';
		if (this.precision !== undefined && this.scale !== undefined) {
			type += `float(${this.precision},${this.scale})`;
		} else if (this.precision === undefined) {
			type += 'float';
		} else {
			type += `float(${this.precision})`;
		}
		return this.unsigned ? `${type} unsigned` : type;
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does getSQLType() do?
getSQLType() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/mysql-core/columns/float.ts.
Where is getSQLType() defined?
getSQLType() is defined in drizzle-orm/src/mysql-core/columns/float.ts at line 46.
What does getSQLType() call?
getSQLType() calls 1 function(s): float.

Analyze Your Own Codebase

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

Try Supermodel Free