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

commentsConfig() — drizzle-orm Function Reference

Architecture documentation for the commentsConfig() function in sqlite.schema.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  5fd7b189_6061_f585_2762_df46fb34af82["commentsConfig()"]
  8e6540c2_b1bc_2b59_6309_c7551073ed36["sqlite.schema.ts"]
  5fd7b189_6061_f585_2762_df46fb34af82 -->|defined in| 8e6540c2_b1bc_2b59_6309_c7551073ed36
  style 5fd7b189_6061_f585_2762_df46fb34af82 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

integration-tests/tests/relational/sqlite.schema.ts lines 82–92

export const commentsConfig = relations(commentsTable, ({ one, many }) => ({
	post: one(postsTable, {
		fields: [commentsTable.postId],
		references: [postsTable.id],
	}),
	author: one(usersTable, {
		fields: [commentsTable.creator],
		references: [usersTable.id],
	}),
	likes: many(commentLikesTable),
}));

Domain

Subdomains

Frequently Asked Questions

What does commentsConfig() do?
commentsConfig() is a function in the drizzle-orm codebase, defined in integration-tests/tests/relational/sqlite.schema.ts.
Where is commentsConfig() defined?
commentsConfig() is defined in integration-tests/tests/relational/sqlite.schema.ts at line 82.

Analyze Your Own Codebase

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

Try Supermodel Free