text.ts — drizzle-orm Source File
Architecture documentation for text.ts, a typescript file in the drizzle-orm codebase. 7 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR a15f2cb7_4465_6310_5d15_9cfa4ad98d64["text.ts"] a4c1e5cb_a206_4786_985b_0e0a35ddd536["common.ts"] a15f2cb7_4465_6310_5d15_9cfa4ad98d64 --> a4c1e5cb_a206_4786_985b_0e0a35ddd536 f78ef1e1_d140_1e8a_3de5_d93a866c939f["SQLiteColumn"] a15f2cb7_4465_6310_5d15_9cfa4ad98d64 --> f78ef1e1_d140_1e8a_3de5_d93a866c939f 2dc784c6_95e9_4e28_ec81_7caf4acbd426["column-builder.ts"] a15f2cb7_4465_6310_5d15_9cfa4ad98d64 --> 2dc784c6_95e9_4e28_ec81_7caf4acbd426 05f0a280_d0c9_693a_a4bf_83cc671012d2["column.ts"] a15f2cb7_4465_6310_5d15_9cfa4ad98d64 --> 05f0a280_d0c9_693a_a4bf_83cc671012d2 27705a9d_afe9_57dd_8c97_e52d8a67d426["entity.ts"] a15f2cb7_4465_6310_5d15_9cfa4ad98d64 --> 27705a9d_afe9_57dd_8c97_e52d8a67d426 227c0a5e_dd35_a654_1766_5a30cb1b922f["table.ts"] a15f2cb7_4465_6310_5d15_9cfa4ad98d64 --> 227c0a5e_dd35_a654_1766_5a30cb1b922f ecce3253_1e75_a87f_27b3_ca87e81a3024["utils.ts"] a15f2cb7_4465_6310_5d15_9cfa4ad98d64 --> ecce3253_1e75_a87f_27b3_ca87e81a3024 0bca2cbd_0e97_da69_ba34_0de360b77802["all.ts"] 0bca2cbd_0e97_da69_ba34_0de360b77802 --> a15f2cb7_4465_6310_5d15_9cfa4ad98d64 style a15f2cb7_4465_6310_5d15_9cfa4ad98d64 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 { AnySQLiteTable } from '~/sqlite-core/table.ts';
import { type Equal, getColumnNameAndConfig, type Writable } from '~/utils.ts';
import { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';
export type SQLiteTextBuilderInitial<
TName extends string,
TEnum extends [string, ...string[]],
TLength extends number | undefined,
> = SQLiteTextBuilder<{
name: TName;
dataType: 'string';
columnType: 'SQLiteText';
data: TEnum[number];
driverParam: string;
enumValues: TEnum;
length: TLength;
}>;
export class SQLiteTextBuilder<
T extends ColumnBuilderBaseConfig<'string', 'SQLiteText'> & { length?: number | undefined },
> extends SQLiteColumnBuilder<
T,
{ length: T['length']; enumValues: T['enumValues'] },
{ length: T['length'] }
> {
static override readonly [entityKind]: string = 'SQLiteTextBuilder';
constructor(name: T['name'], config: SQLiteTextConfig<'text', T['enumValues'], T['length']>) {
super(name, 'string', 'SQLiteText');
this.config.enumValues = config.enum;
this.config.length = config.length;
}
/** @internal */
override build<TTableName extends string>(
table: AnySQLiteTable<{ name: TTableName }>,
): SQLiteText<MakeColumnConfig<T, TTableName> & { length: T['length'] }> {
return new SQLiteText<MakeColumnConfig<T, TTableName> & { length: T['length'] }>(
table,
this.config as ColumnBuilderRuntimeConfig<any, any>,
);
}
}
export class SQLiteText<T extends ColumnBaseConfig<'string', 'SQLiteText'> & { length?: number | undefined }>
extends SQLiteColumn<T, { length: T['length']; enumValues: T['enumValues'] }>
{
static override readonly [entityKind]: string = 'SQLiteText';
override readonly enumValues = this.config.enumValues;
readonly length: T['length'] = this.config.length;
constructor(
table: AnySQLiteTable<{ name: T['tableName'] }>,
config: SQLiteTextBuilder<T>['config'],
) {
// ... (98 more lines)
Domain
Subdomains
Functions
Dependencies
- SQLiteColumn
- column-builder.ts
- column.ts
- common.ts
- entity.ts
- table.ts
- utils.ts
Imported By
Source
Frequently Asked Questions
What does text.ts do?
text.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain, SQLDialects subdomain.
What functions are defined in text.ts?
text.ts defines 1 function(s): text.
What does text.ts depend on?
text.ts imports 7 module(s): SQLiteColumn, column-builder.ts, column.ts, common.ts, entity.ts, table.ts, utils.ts.
What files import text.ts?
text.ts is imported by 1 file(s): all.ts.
Where is text.ts in the architecture?
text.ts is located at drizzle-orm/src/sqlite-core/columns/text.ts (domain: DrizzleORM, subdomain: SQLDialects, directory: drizzle-orm/src/sqlite-core/columns).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free