ExtractTablesWithRelations Type — drizzle-orm Architecture
Architecture documentation for the ExtractTablesWithRelations type/interface in relations.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD baac3f85_cd2a_60f8_8558_0120c1ad8cc4["ExtractTablesWithRelations"] 2f47d090_425d_2e56_2395_4c4d912316f0["relations.ts"] baac3f85_cd2a_60f8_8558_0120c1ad8cc4 -->|defined in| 2f47d090_425d_2e56_2395_4c4d912316f0 style baac3f85_cd2a_60f8_8558_0120c1ad8cc4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/relations.ts lines 298–315
export type ExtractTablesWithRelations<
TSchema extends Record<string, unknown>,
> = {
[
K in keyof TSchema as TSchema[K] extends Table ? K
: never
]: TSchema[K] extends Table ? {
tsName: K & string;
dbName: TSchema[K]['_']['name'];
columns: TSchema[K]['_']['columns'];
relations: ExtractTableRelationsFromSchema<
TSchema,
TSchema[K]['_']['name']
>;
primaryKey: AnyColumn[];
}
: never;
};
Defined In
Source
Frequently Asked Questions
What is the ExtractTablesWithRelations type?
ExtractTablesWithRelations is a type/interface in the drizzle-orm codebase, defined in drizzle-orm/src/relations.ts.
Where is ExtractTablesWithRelations defined?
ExtractTablesWithRelations is defined in drizzle-orm/src/relations.ts at line 298.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free