Home / Type/ CreateSelectSchema Type — drizzle-orm Architecture

CreateSelectSchema Type — drizzle-orm Architecture

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

drizzle-zod/src/schema.types.ts lines 6–28

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

	<TView extends View>(view: TView): BuildSchema<'select', TView['_']['selectedFields'], undefined, TCoerce>;
	<
		TView extends View,
		TRefine extends BuildRefine<TView['_']['selectedFields'], TCoerce>,
	>(
		view: TView,
		refine: NoUnknownKeys<TRefine, TView['$inferSelect']>,
	): BuildSchema<'select', TView['_']['selectedFields'], TRefine, TCoerce>;

	<TEnum extends PgEnum<any>>(enum_: TEnum): z.ZodEnum<{ [K in TEnum['enumValues'][number]]: K }>;
}

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free