Home / Type/ IndexConfig Type — drizzle-orm Architecture

IndexConfig Type — drizzle-orm Architecture

Architecture documentation for the IndexConfig type/interface in indexes.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  ea252402_56f1_3f93_54a8_01fa2cf65c76["IndexConfig"]
  7b0ca33c_3376_20c9_6b77_848d5f16df3d["indexes.ts"]
  ea252402_56f1_3f93_54a8_01fa2cf65c76 -->|defined in| 7b0ca33c_3376_20c9_6b77_848d5f16df3d
  style ea252402_56f1_3f93_54a8_01fa2cf65c76 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/mysql-core/indexes.ts lines 6–30

interface IndexConfig {
	name: string;

	columns: IndexColumn[];

	/**
	 * If true, the index will be created as `create unique index` instead of `create index`.
	 */
	unique?: boolean;

	/**
	 * If set, the index will be created as `create index ... using { 'btree' | 'hash' }`.
	 */
	using?: 'btree' | 'hash';

	/**
	 * If set, the index will be created as `create index ... algorithm { 'default' | 'inplace' | 'copy' }`.
	 */
	algorithm?: 'default' | 'inplace' | 'copy';

	/**
	 * If set, adds locks to the index creation.
	 */
	lock?: 'default' | 'none' | 'shared' | 'exclusive';
}

Frequently Asked Questions

What is the IndexConfig type?
IndexConfig is a type/interface in the drizzle-orm codebase, defined in drizzle-orm/src/mysql-core/indexes.ts.
Where is IndexConfig defined?
IndexConfig is defined in drizzle-orm/src/mysql-core/indexes.ts at line 6.

Analyze Your Own Codebase

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

Try Supermodel Free