int.common.ts — drizzle-orm Source File
Architecture documentation for int.common.ts, a typescript file in the drizzle-orm codebase. 4 imports, 3 dependents.
Entity Profile
Dependency Diagram
graph LR 5e8f073a_0845_8d49_1d60_aeb1c020baaf["int.common.ts"] c67b5e95_842f_36c8_80c4_20ed982f5bfe["sequence.ts"] 5e8f073a_0845_8d49_1d60_aeb1c020baaf --> c67b5e95_842f_36c8_80c4_20ed982f5bfe f4f42b4c_8610_03dd_fe01_232098668127["common.ts"] 5e8f073a_0845_8d49_1d60_aeb1c020baaf --> f4f42b4c_8610_03dd_fe01_232098668127 2dc784c6_95e9_4e28_ec81_7caf4acbd426["column-builder.ts"] 5e8f073a_0845_8d49_1d60_aeb1c020baaf --> 2dc784c6_95e9_4e28_ec81_7caf4acbd426 27705a9d_afe9_57dd_8c97_e52d8a67d426["entity.ts"] 5e8f073a_0845_8d49_1d60_aeb1c020baaf --> 27705a9d_afe9_57dd_8c97_e52d8a67d426 9e45dd50_595c_fce2_0195_02a2865c70ed["bigint.ts"] 9e45dd50_595c_fce2_0195_02a2865c70ed --> 5e8f073a_0845_8d49_1d60_aeb1c020baaf aa24862a_059d_ca86_f04a_b885894027fa["integer.ts"] aa24862a_059d_ca86_f04a_b885894027fa --> 5e8f073a_0845_8d49_1d60_aeb1c020baaf 1efe7a66_e4ac_9b00_b7f9_c6b0047ae0f8["smallint.ts"] 1efe7a66_e4ac_9b00_b7f9_c6b0047ae0f8 --> 5e8f073a_0845_8d49_1d60_aeb1c020baaf style 5e8f073a_0845_8d49_1d60_aeb1c020baaf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { ColumnBuilderBaseConfig, ColumnDataType, GeneratedIdentityConfig, IsIdentity } from '~/column-builder.ts';
import { entityKind } from '~/entity.ts';
import type { PgSequenceOptions } from '../sequence.ts';
import { PgColumnBuilder } from './common.ts';
export abstract class PgIntColumnBaseBuilder<
T extends ColumnBuilderBaseConfig<ColumnDataType, string>,
> extends PgColumnBuilder<
T,
{ generatedIdentity: GeneratedIdentityConfig }
> {
static override readonly [entityKind]: string = 'PgIntColumnBaseBuilder';
generatedAlwaysAsIdentity(
sequence?: PgSequenceOptions & { name?: string },
): IsIdentity<this, 'always'> {
if (sequence) {
const { name, ...options } = sequence;
this.config.generatedIdentity = {
type: 'always',
sequenceName: name,
sequenceOptions: options,
};
} else {
this.config.generatedIdentity = {
type: 'always',
};
}
this.config.hasDefault = true;
this.config.notNull = true;
return this as IsIdentity<this, 'always'>;
}
generatedByDefaultAsIdentity(
sequence?: PgSequenceOptions & { name?: string },
): IsIdentity<this, 'byDefault'> {
if (sequence) {
const { name, ...options } = sequence;
this.config.generatedIdentity = {
type: 'byDefault',
sequenceName: name,
sequenceOptions: options,
};
} else {
this.config.generatedIdentity = {
type: 'byDefault',
};
}
this.config.hasDefault = true;
this.config.notNull = true;
return this as IsIdentity<this, 'byDefault'>;
}
}
Domain
Dependencies
- column-builder.ts
- common.ts
- entity.ts
- sequence.ts
Imported By
Source
Frequently Asked Questions
What does int.common.ts do?
int.common.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain.
What does int.common.ts depend on?
int.common.ts imports 4 module(s): column-builder.ts, common.ts, entity.ts, sequence.ts.
What files import int.common.ts?
int.common.ts is imported by 3 file(s): bigint.ts, integer.ts, smallint.ts.
Where is int.common.ts in the architecture?
int.common.ts is located at drizzle-orm/src/pg-core/columns/int.common.ts (domain: DrizzleORM, directory: drizzle-orm/src/pg-core/columns).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free