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 d68ab46e_67ad_96a0_443d_d4c25c8054ee["CustomTypeValues"] 2d665331_c10f_e80b_925f_d2148b29ca86["custom.ts"] d68ab46e_67ad_96a0_443d_d4c25c8054ee -->|defined in| 2d665331_c10f_e80b_925f_d2148b29ca86 style d68ab46e_67ad_96a0_443d_d4c25c8054ee fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/pg-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;
};
Defined In
Source
Frequently Asked Questions
What is the CustomTypeValues type?
CustomTypeValues is a type/interface in the drizzle-orm codebase, defined in drizzle-orm/src/pg-core/columns/custom.ts.
Where is CustomTypeValues defined?
CustomTypeValues is defined in drizzle-orm/src/pg-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