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 DatabaseDrivers 2 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  b039a9aa_0a35_3f11_d598_f488b39b8a3c["1-to-1-fk.ts"]
  0a6e24d8_d800_46a3_de39_83e01b890d62["index.ts"]
  b039a9aa_0a35_3f11_d598_f488b39b8a3c --> 0a6e24d8_d800_46a3_de39_83e01b890d62
  17418917_ff81_c4e5_90f4_f37d557e5d51["table.ts"]
  b039a9aa_0a35_3f11_d598_f488b39b8a3c --> 17418917_ff81_c4e5_90f4_f37d557e5d51
  style b039a9aa_0a35_3f11_d598_f488b39b8a3c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { integer, type PgColumn, serial } from '~/pg-core/columns/index.ts';
import { pgTable } from '~/pg-core/table.ts';

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

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

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

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

	const test2 = pgTable('test2_table', {
		id: serial('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, DatabaseDrivers 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/pg/1-to-1-fk.ts (domain: DrizzleORM, subdomain: DatabaseDrivers, directory: drizzle-orm/type-tests/pg).

Analyze Your Own Codebase

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

Try Supermodel Free