Home / File/ bigintT.ts — drizzle-orm Source File

bigintT.ts — drizzle-orm Source File

Architecture documentation for bigintT.ts, a typescript file in the drizzle-orm codebase. 7 imports, 1 dependents.

File typescript DrizzleORM RelationalQuery 7 imports 1 dependents 1 functions 2 classes

Entity Profile

Dependency Diagram

graph LR
  e5c9b8ef_d760_345f_c691_226de7d20135["bigintT.ts"]
  a74dd48d_d5e3_6bb4_19c7_1954c9126816["common.ts"]
  e5c9b8ef_d760_345f_c691_226de7d20135 --> a74dd48d_d5e3_6bb4_19c7_1954c9126816
  d67beed0_fcf6_77d7_10cf_cdcfd53f8551["GelColumn"]
  e5c9b8ef_d760_345f_c691_226de7d20135 --> d67beed0_fcf6_77d7_10cf_cdcfd53f8551
  5fdca641_932c_bf0c_9007_2ff637d9c705["int.common.ts"]
  e5c9b8ef_d760_345f_c691_226de7d20135 --> 5fdca641_932c_bf0c_9007_2ff637d9c705
  2dc784c6_95e9_4e28_ec81_7caf4acbd426["column-builder.ts"]
  e5c9b8ef_d760_345f_c691_226de7d20135 --> 2dc784c6_95e9_4e28_ec81_7caf4acbd426
  05f0a280_d0c9_693a_a4bf_83cc671012d2["column.ts"]
  e5c9b8ef_d760_345f_c691_226de7d20135 --> 05f0a280_d0c9_693a_a4bf_83cc671012d2
  27705a9d_afe9_57dd_8c97_e52d8a67d426["entity.ts"]
  e5c9b8ef_d760_345f_c691_226de7d20135 --> 27705a9d_afe9_57dd_8c97_e52d8a67d426
  c1a47e5e_63aa_1ab2_abac_86e509f63e7c["table.ts"]
  e5c9b8ef_d760_345f_c691_226de7d20135 --> c1a47e5e_63aa_1ab2_abac_86e509f63e7c
  ee61f0b9_206c_6b7b_5671_49b96bcf3a63["all.ts"]
  ee61f0b9_206c_6b7b_5671_49b96bcf3a63 --> e5c9b8ef_d760_345f_c691_226de7d20135
  style e5c9b8ef_d760_345f_c691_226de7d20135 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';
import type { ColumnBaseConfig } from '~/column.ts';
import { entityKind } from '~/entity.ts';
import type { AnyGelTable } from '~/gel-core/table.ts';
import { GelColumn } from './common.ts';
import { GelIntColumnBaseBuilder } from './int.common.ts';

export type GelBigInt64BuilderInitial<TName extends string> = GelBigInt64Builder<{
	name: TName;
	dataType: 'bigint';
	columnType: 'GelBigInt64';
	data: bigint;
	driverParam: bigint;
	enumValues: undefined;
}>;

export class GelBigInt64Builder<T extends ColumnBuilderBaseConfig<'bigint', 'GelBigInt64'>>
	extends GelIntColumnBaseBuilder<T>
{
	static override readonly [entityKind]: string = 'GelBigInt64Builder';

	constructor(name: T['name']) {
		super(name, 'bigint', 'GelBigInt64');
	}

	/** @internal */
	override build<TTableName extends string>(
		table: AnyGelTable<{ name: TTableName }>,
	): GelBigInt64<MakeColumnConfig<T, TTableName>> {
		return new GelBigInt64<MakeColumnConfig<T, TTableName>>(
			table,
			this.config as ColumnBuilderRuntimeConfig<any, any>,
		);
	}
}

export class GelBigInt64<T extends ColumnBaseConfig<'bigint', 'GelBigInt64'>> extends GelColumn<T> {
	static override readonly [entityKind]: string = 'GelBigInt64';

	getSQLType(): string {
		return 'edgedbt.bigint_t';
	}

	override mapFromDriverValue(value: string): bigint {
		return BigInt(value as string); // TODO ts error if remove 'as string'
	}
}

export function bigintT(): GelBigInt64BuilderInitial<''>;
export function bigintT<TName extends string>(name: TName): GelBigInt64BuilderInitial<TName>;
export function bigintT(name?: string) {
	return new GelBigInt64Builder(name ?? '');
}

Domain

Subdomains

Functions

Dependencies

Frequently Asked Questions

What does bigintT.ts do?
bigintT.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 bigintT.ts?
bigintT.ts defines 1 function(s): bigintT.
What does bigintT.ts depend on?
bigintT.ts imports 7 module(s): GelColumn, column-builder.ts, column.ts, common.ts, entity.ts, int.common.ts, table.ts.
What files import bigintT.ts?
bigintT.ts is imported by 1 file(s): all.ts.
Where is bigintT.ts in the architecture?
bigintT.ts is located at drizzle-orm/src/gel-core/columns/bigintT.ts (domain: DrizzleORM, subdomain: RelationalQuery, directory: drizzle-orm/src/gel-core/columns).

Analyze Your Own Codebase

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

Try Supermodel Free