boolean.ts — drizzle-orm Source File
Architecture documentation for boolean.ts, a typescript file in the drizzle-orm codebase. 5 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR f05c1058_a4cf_8e74_3869_e72c5eafcfa7["boolean.ts"] 76efc057_bebb_43f9_90dc_cf3352a8e195["common.ts"] f05c1058_a4cf_8e74_3869_e72c5eafcfa7 --> 76efc057_bebb_43f9_90dc_cf3352a8e195 4902d8fe_5835_4d2e_05e6_8f0c296dadf3["column-builder.ts"] f05c1058_a4cf_8e74_3869_e72c5eafcfa7 --> 4902d8fe_5835_4d2e_05e6_8f0c296dadf3 52cabd36_d0c9_d018_35bc_6856fc89d73f["column.ts"] f05c1058_a4cf_8e74_3869_e72c5eafcfa7 --> 52cabd36_d0c9_d018_35bc_6856fc89d73f 9347c3af_060d_bd99_cd17_d7f17fadf7cb["entity.ts"] f05c1058_a4cf_8e74_3869_e72c5eafcfa7 --> 9347c3af_060d_bd99_cd17_d7f17fadf7cb cd5cd141_36dc_5b56_0fb9_47b16250a1ea["table.ts"] f05c1058_a4cf_8e74_3869_e72c5eafcfa7 --> cd5cd141_36dc_5b56_0fb9_47b16250a1ea d2980893_b21d_eaac_2456_8be2597fa822["all.ts"] d2980893_b21d_eaac_2456_8be2597fa822 --> f05c1058_a4cf_8e74_3869_e72c5eafcfa7 style f05c1058_a4cf_8e74_3869_e72c5eafcfa7 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 { AnySingleStoreTable } from '~/singlestore-core/table.ts';
import { SingleStoreColumn, SingleStoreColumnBuilder } from './common.ts';
export type SingleStoreBooleanBuilderInitial<TName extends string> = SingleStoreBooleanBuilder<{
name: TName;
dataType: 'boolean';
columnType: 'SingleStoreBoolean';
data: boolean;
driverParam: number | boolean;
enumValues: undefined;
generated: undefined;
}>;
export class SingleStoreBooleanBuilder<T extends ColumnBuilderBaseConfig<'boolean', 'SingleStoreBoolean'>>
extends SingleStoreColumnBuilder<T>
{
static override readonly [entityKind]: string = 'SingleStoreBooleanBuilder';
constructor(name: T['name']) {
super(name, 'boolean', 'SingleStoreBoolean');
}
/** @internal */
override build<TTableName extends string>(
table: AnySingleStoreTable<{ name: TTableName }>,
): SingleStoreBoolean<MakeColumnConfig<T, TTableName>> {
return new SingleStoreBoolean<MakeColumnConfig<T, TTableName>>(
table,
this.config as ColumnBuilderRuntimeConfig<any, any>,
);
}
}
export class SingleStoreBoolean<T extends ColumnBaseConfig<'boolean', 'SingleStoreBoolean'>>
extends SingleStoreColumn<T>
{
static override readonly [entityKind]: string = 'SingleStoreBoolean';
getSQLType(): string {
return 'boolean';
}
override mapFromDriverValue(value: number | boolean): boolean {
if (typeof value === 'boolean') {
return value;
}
return value === 1;
}
}
export function boolean(): SingleStoreBooleanBuilderInitial<''>;
export function boolean<TName extends string>(name: TName): SingleStoreBooleanBuilderInitial<TName>;
export function boolean(name?: string) {
return new SingleStoreBooleanBuilder(name ?? '');
}
Domain
Subdomains
Functions
Dependencies
- column-builder.ts
- column.ts
- common.ts
- entity.ts
- table.ts
Imported By
Source
Frequently Asked Questions
What does boolean.ts do?
boolean.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain, SchemaDefinitions subdomain.
What functions are defined in boolean.ts?
boolean.ts defines 1 function(s): boolean.
What does boolean.ts depend on?
boolean.ts imports 5 module(s): column-builder.ts, column.ts, common.ts, entity.ts, table.ts.
What files import boolean.ts?
boolean.ts is imported by 1 file(s): all.ts.
Where is boolean.ts in the architecture?
boolean.ts is located at drizzle-orm/src/singlestore-core/columns/boolean.ts (domain: DrizzleORM, subdomain: SchemaDefinitions, directory: drizzle-orm/src/singlestore-core/columns).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free