Home / Function/ hasDefault() — astro Function Reference

hasDefault() — astro Function Reference

Architecture documentation for the hasDefault() function in queries.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  308704d1_f21a_bebd_4073_054b6e508bd8["hasDefault()"]
  ad642171_aa4f_abf2_da4d_c5b2e217a132["queries.ts"]
  308704d1_f21a_bebd_4073_054b6e508bd8 -->|defined in| ad642171_aa4f_abf2_da4d_c5b2e217a132
  8d1b704b_bb80_1aba_c294_631b6d77405c["getModifiers()"]
  8d1b704b_bb80_1aba_c294_631b6d77405c -->|calls| 308704d1_f21a_bebd_4073_054b6e508bd8
  style 308704d1_f21a_bebd_4073_054b6e508bd8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/db/src/core/queries.ts lines 157–165

export function hasDefault(column: DBColumn): column is DBColumnWithDefault {
	if (column.schema.default !== undefined) {
		return true;
	}
	if (hasPrimaryKey(column) && column.type === 'number') {
		return true;
	}
	return false;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does hasDefault() do?
hasDefault() is a function in the astro codebase, defined in packages/db/src/core/queries.ts.
Where is hasDefault() defined?
hasDefault() is defined in packages/db/src/core/queries.ts at line 157.
What calls hasDefault()?
hasDefault() is called by 1 function(s): getModifiers.

Analyze Your Own Codebase

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

Try Supermodel Free