Home / File/ 1-to-1-fk.ts — drizzle-orm Source File

1-to-1-fk.ts — drizzle-orm Source File

Architecture documentation for 1-to-1-fk.ts, a typescript file in the drizzle-orm codebase. 2 imports, 0 dependents.

File typescript DrizzleORM RelationalQuery 2 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  f75d1771_5ea4_7f3f_a4ab_e7d3f70b6e25["1-to-1-fk.ts"]
  63414497_7c3c_fa30_3735_57e9e37ccc7c["index.ts"]
  f75d1771_5ea4_7f3f_a4ab_e7d3f70b6e25 --> 63414497_7c3c_fa30_3735_57e9e37ccc7c
  c1a47e5e_63aa_1ab2_abac_86e509f63e7c["table.ts"]
  f75d1771_5ea4_7f3f_a4ab_e7d3f70b6e25 --> c1a47e5e_63aa_1ab2_abac_86e509f63e7c
  style f75d1771_5ea4_7f3f_a4ab_e7d3f70b6e25 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { type GelColumn, integer } from '~/gel-core/columns/index.ts';
import { gelTable } from '~/gel-core/table.ts';

{
	const test1 = gelTable('test1_table', {
		id: integer('id').primaryKey(),
		test2Id: integer('test2_id').references(() => test2.id),
	});

	const test1Id = integer('test1_id').references(() => test1.id);

	const test2 = gelTable('test2_table', {
		id: integer('id').primaryKey(),
		test1Id,
	});
}

{
	const test1 = gelTable('test1_table', {
		id: integer('id').primaryKey(),
		test2Id: integer('test2_id').references((): GelColumn => test2.id),
	});

	const test2 = gelTable('test2_table', {
		id: integer('id').primaryKey(),
		test1Id: integer('test1_id').references(() => test1.id),
	});
}

Domain

Subdomains

Functions

Dependencies

  • index.ts
  • table.ts

Frequently Asked Questions

What does 1-to-1-fk.ts do?
1-to-1-fk.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain, RelationalQuery subdomain.
What functions are defined in 1-to-1-fk.ts?
1-to-1-fk.ts defines 1 function(s): test1Id.
What does 1-to-1-fk.ts depend on?
1-to-1-fk.ts imports 2 module(s): index.ts, table.ts.
Where is 1-to-1-fk.ts in the architecture?
1-to-1-fk.ts is located at drizzle-orm/type-tests/geldb/1-to-1-fk.ts (domain: DrizzleORM, subdomain: RelationalQuery, directory: drizzle-orm/type-tests/geldb).

Analyze Your Own Codebase

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

Try Supermodel Free