Home / Type/ GetTypeboxType Type — drizzle-orm Architecture

GetTypeboxType Type — drizzle-orm Architecture

Architecture documentation for the GetTypeboxType type/interface in column.types.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  304d9f25_d2cb_561b_9b2a_bfc9d12935ac["GetTypeboxType"]
  fd4de090_7c5a_7c27_ce27_db1f6b3f576e["column.types.ts"]
  304d9f25_d2cb_561b_9b2a_bfc9d12935ac -->|defined in| fd4de090_7c5a_7c27_ce27_db1f6b3f576e
  style 304d9f25_d2cb_561b_9b2a_bfc9d12935ac fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-typebox/src/column.types.ts lines 16–58

export type GetTypeboxType<
	TColumn extends Column,
> = TColumn['_']['columnType'] extends
	| 'MySqlTinyInt'
	| 'SingleStoreTinyInt'
	| 'PgSmallInt'
	| 'PgSmallSerial'
	| 'MySqlSmallInt'
	| 'MySqlMediumInt'
	| 'SingleStoreSmallInt'
	| 'SingleStoreMediumInt'
	| 'PgInteger'
	| 'PgSerial'
	| 'MySqlInt'
	| 'SingleStoreInt'
	| 'PgBigInt53'
	| 'PgBigSerial53'
	| 'MySqlBigInt53'
	| 'MySqlSerial'
	| 'SingleStoreBigInt53'
	| 'SingleStoreSerial'
	| 'SQLiteInteger'
	| 'MySqlYear'
	| 'SingleStoreYear' ? t.TInteger
	: TColumn['_']['columnType'] extends 'PgBinaryVector' ? t.TRegExp
	: HasBaseColumn<TColumn> extends true ? t.TArray<
			GetTypeboxType<Assume<TColumn['_']['baseColumn'], Column>>
		>
	: IsEnumDefined<TColumn['_']['enumValues']> extends true
		? t.TEnum<{ [K in Assume<TColumn['_']['enumValues'], string[]>[number]]: K }>
	: TColumn['_']['columnType'] extends 'PgGeometry' | 'PgPointTuple' ? t.TTuple<[t.TNumber, t.TNumber]>
	: TColumn['_']['columnType'] extends 'PgLine' ? t.TTuple<[t.TNumber, t.TNumber, t.TNumber]>
	: TColumn['_']['data'] extends Date ? t.TDate
	: TColumn['_']['data'] extends Buffer ? BufferSchema
	: TColumn['_']['dataType'] extends 'array'
		? t.TArray<GetTypeboxPrimitiveType<Assume<TColumn['_']['data'], any[]>[number]>>
	: TColumn['_']['data'] extends Record<string, any>
		? TColumn['_']['columnType'] extends
			'PgJson' | 'PgJsonb' | 'MySqlJson' | 'SingleStoreJson' | 'SQLiteTextJson' | 'SQLiteBlobJson'
			? GenericSchema<TColumn['_']['data']>
		: t.TObject<{ [K in keyof TColumn['_']['data']]: GetTypeboxPrimitiveType<TColumn['_']['data'][K]> }>
	: TColumn['_']['dataType'] extends 'json' ? JsonSchema
	: GetTypeboxPrimitiveType<TColumn['_']['data']>;

Frequently Asked Questions

What is the GetTypeboxType type?
GetTypeboxType is a type/interface in the drizzle-orm codebase, defined in drizzle-typebox/src/column.types.ts.
Where is GetTypeboxType defined?
GetTypeboxType is defined in drizzle-typebox/src/column.types.ts at line 16.

Analyze Your Own Codebase

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

Try Supermodel Free