bigintColumnToSchema() — drizzle-orm Function Reference
Architecture documentation for the bigintColumnToSchema() function in column.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 44cb6f82_4017_dd83_eb46_d80b623fef5d["bigintColumnToSchema()"] d3d3a2d1_4197_a39b_12f9_f9c7be54febc["column.ts"] 44cb6f82_4017_dd83_eb46_d80b623fef5d -->|defined in| d3d3a2d1_4197_a39b_12f9_f9c7be54febc 85adcc4b_0e8e_a2e6_a538_afbe19c96304["columnToSchema()"] 85adcc4b_0e8e_a2e6_a538_afbe19c96304 -->|calls| 44cb6f82_4017_dd83_eb46_d80b623fef5d style 44cb6f82_4017_dd83_eb46_d80b623fef5d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-zod/src/column.ts lines 252–265
function bigintColumnToSchema(
column: Column,
z: typeof zod,
coerce: CreateSchemaFactoryOptions<
Partial<Record<'bigint' | 'boolean' | 'date' | 'number' | 'string', true>> | true | undefined
>['coerce'],
): zod.ZodType {
const unsigned = column.getSQLType().includes('unsigned');
const min = unsigned ? 0n : CONSTANTS.INT64_MIN;
const max = unsigned ? CONSTANTS.INT64_UNSIGNED_MAX : CONSTANTS.INT64_MAX;
const schema = coerce === true || coerce?.bigint ? z.coerce.bigint() : z.bigint();
return schema.gte(min).lte(max);
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does bigintColumnToSchema() do?
bigintColumnToSchema() is a function in the drizzle-orm codebase, defined in drizzle-zod/src/column.ts.
Where is bigintColumnToSchema() defined?
bigintColumnToSchema() is defined in drizzle-zod/src/column.ts at line 252.
What calls bigintColumnToSchema()?
bigintColumnToSchema() is called by 1 function(s): columnToSchema.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free