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

isCyclic() — drizzle-orm Function Reference

Architecture documentation for the isCyclic() function in introspect-pg.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  7920a2b5_4791_abeb_cbd1_adae59f54b93["isCyclic()"]
  71516551_23e3_bf30_27c9_000fb046ef71["introspect-pg.ts"]
  7920a2b5_4791_abeb_cbd1_adae59f54b93 -->|defined in| 71516551_23e3_bf30_27c9_000fb046ef71
  ae4bc88a_1e24_ce7b_ea80_728e39b829ef["schemaToTypeScript()"]
  ae4bc88a_1e24_ce7b_ea80_728e39b829ef -->|calls| 7920a2b5_4791_abeb_cbd1_adae59f54b93
  d060c9b2_d1df_37e7_df71_422307a42ed6["createTableColumns()"]
  d060c9b2_d1df_37e7_df71_422307a42ed6 -->|calls| 7920a2b5_4791_abeb_cbd1_adae59f54b93
  style 7920a2b5_4791_abeb_cbd1_adae59f54b93 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-kit/src/introspect-pg.ts lines 638–642

const isCyclic = (fk: ForeignKey) => {
	const key = `${fk.tableFrom}-${fk.tableTo}`;
	const reverse = `${fk.tableTo}-${fk.tableFrom}`;
	return relations.has(key) && relations.has(reverse);
};

Domain

Subdomains

Frequently Asked Questions

What does isCyclic() do?
isCyclic() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/introspect-pg.ts.
Where is isCyclic() defined?
isCyclic() is defined in drizzle-kit/src/introspect-pg.ts at line 638.
What calls isCyclic()?
isCyclic() is called by 2 function(s): createTableColumns, schemaToTypeScript.

Analyze Your Own Codebase

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

Try Supermodel Free