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

nodeRelations() — drizzle-orm Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  befbb151_3e6f_cb10_977f_85642ecdee8b["nodeRelations()"]
  931dc543_40fe_480a_552e_6df25afd3185["tables.ts"]
  befbb151_3e6f_cb10_977f_85642ecdee8b -->|defined in| 931dc543_40fe_480a_552e_6df25afd3185
  style befbb151_3e6f_cb10_977f_85642ecdee8b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

integration-tests/tests/relational/tables.ts lines 75–79

export const nodeRelations = relations(node, ({ one }) => ({
	parent: one(node, { fields: [node.parentId], references: [node.id] }),
	left: one(node, { fields: [node.leftId], references: [node.id] }),
	right: one(node, { fields: [node.rightId], references: [node.id] }),
}));

Domain

Subdomains

Frequently Asked Questions

What does nodeRelations() do?
nodeRelations() is a function in the drizzle-orm codebase, defined in integration-tests/tests/relational/tables.ts.
Where is nodeRelations() defined?
nodeRelations() is defined in integration-tests/tests/relational/tables.ts at line 75.

Analyze Your Own Codebase

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

Try Supermodel Free