Home / Type/ CreateInsertSchema Type — drizzle-orm Architecture

CreateInsertSchema Type — drizzle-orm Architecture

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

Entity Profile

Dependency Diagram

graph TD
  27f7fa3f_065b_bd54_c91e_3e9686c1f4dc["CreateInsertSchema"]
  37a75c34_5ecc_3525_ecb4_d53dfebc43bb["schema.types.ts"]
  27f7fa3f_065b_bd54_c91e_3e9686c1f4dc -->|defined in| 37a75c34_5ecc_3525_ecb4_d53dfebc43bb
  style 27f7fa3f_065b_bd54_c91e_3e9686c1f4dc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-zod/src/schema.types.ts lines 30–41

export interface CreateInsertSchema<
	TCoerce extends Partial<Record<'bigint' | 'boolean' | 'date' | 'number' | 'string', true>> | true | undefined,
> {
	<TTable extends Table>(table: TTable): BuildSchema<'insert', TTable['_']['columns'], undefined, TCoerce>;
	<
		TTable extends Table,
		TRefine extends BuildRefine<Pick<TTable['_']['columns'], keyof TTable['$inferInsert']>, TCoerce>,
	>(
		table: TTable,
		refine?: NoUnknownKeys<TRefine, TTable['$inferInsert']>,
	): BuildSchema<'insert', TTable['_']['columns'], TRefine, TCoerce>;
}

Frequently Asked Questions

What is the CreateInsertSchema type?
CreateInsertSchema is a type/interface in the drizzle-orm codebase, defined in drizzle-zod/src/schema.types.ts.
Where is CreateInsertSchema defined?
CreateInsertSchema is defined in drizzle-zod/src/schema.types.ts at line 30.

Analyze Your Own Codebase

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

Try Supermodel Free