CustomTypeValues Type — drizzle-orm Architecture
Architecture documentation for the CustomTypeValues type/interface in custom.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 9533e38d_559d_7a5e_ae7b_6d248074491c["CustomTypeValues"] e7326635_a1d9_22bf_400e_da3a7dd63899["custom.ts"] 9533e38d_559d_7a5e_ae7b_6d248074491c -->|defined in| e7326635_a1d9_22bf_400e_da3a7dd63899 style 9533e38d_559d_7a5e_ae7b_6d248074491c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/sqlite-core/columns/custom.ts lines 90–141
export type CustomTypeValues = {
/**
* Required type for custom column, that will infer proper type model
*
* Examples:
*
* If you want your column to be `string` type after selecting/or on inserting - use `data: string`. Like `text`, `varchar`
*
* If you want your column to be `number` type after selecting/or on inserting - use `data: number`. Like `integer`
*/
data: unknown;
/**
* Type helper, that represents what type database driver is accepting for specific database data type
*/
driverData?: unknown;
/**
* What config type should be used for {@link CustomTypeParams} `dataType` generation
*/
config?: Record<string, any>;
/**
* Whether the config argument should be required or not
* @default false
*/
configRequired?: boolean;
/**
* If your custom data type should be notNull by default you can use `notNull: true`
*
* @example
* const customSerial = customType<{ data: number, notNull: true, default: true }>({
* dataType() {
* return 'serial';
* },
* });
*/
notNull?: boolean;
/**
* If your custom data type has default you can use `default: true`
*
* @example
* const customSerial = customType<{ data: number, notNull: true, default: true }>({
* dataType() {
* return 'serial';
* },
* });
*/
default?: boolean;
};
Source
Frequently Asked Questions
What is the CustomTypeValues type?
CustomTypeValues is a type/interface in the drizzle-orm codebase, defined in drizzle-orm/src/sqlite-core/columns/custom.ts.
Where is CustomTypeValues defined?
CustomTypeValues is defined in drizzle-orm/src/sqlite-core/columns/custom.ts at line 90.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free