IndexBuilder Class — drizzle-orm Architecture
Architecture documentation for the IndexBuilder class in indexes.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 5ab4f9fa_d5b1_6dc6_127e_ac7fee1f3f79["IndexBuilder"] 8777ea5d_4a78_587f_df18_57c7aa59b8a6["indexes.ts"] 5ab4f9fa_d5b1_6dc6_127e_ac7fee1f3f79 -->|defined in| 8777ea5d_4a78_587f_df18_57c7aa59b8a6 72815416_b228_76ad_cf8f_b974734a53bf["constructor()"] 5ab4f9fa_d5b1_6dc6_127e_ac7fee1f3f79 -->|method| 72815416_b228_76ad_cf8f_b974734a53bf 7e767773_72e1_d4a6_0447_714a96db616f["where()"] 5ab4f9fa_d5b1_6dc6_127e_ac7fee1f3f79 -->|method| 7e767773_72e1_d4a6_0447_714a96db616f f259c6d2_7fbd_71c8_f911_18d4be6a7110["build()"] 5ab4f9fa_d5b1_6dc6_127e_ac7fee1f3f79 -->|method| f259c6d2_7fbd_71c8_f911_18d4be6a7110
Relationship Graph
Source Code
drizzle-orm/src/sqlite-core/indexes.ts lines 25–56
export class IndexBuilder {
static readonly [entityKind]: string = 'SQLiteIndexBuilder';
declare _: {
brand: 'SQLiteIndexBuilder';
};
/** @internal */
config: IndexConfig;
constructor(name: string, columns: IndexColumn[], unique: boolean) {
this.config = {
name,
columns,
unique,
where: undefined,
};
}
/**
* Condition for partial index.
*/
where(condition: SQL): this {
this.config.where = condition;
return this;
}
/** @internal */
build(table: SQLiteTable): Index {
return new Index(this.config, table);
}
}
Domain
Defined In
Source
Frequently Asked Questions
What is the IndexBuilder class?
IndexBuilder is a class in the drizzle-orm codebase, defined in drizzle-orm/src/sqlite-core/indexes.ts.
Where is IndexBuilder defined?
IndexBuilder is defined in drizzle-orm/src/sqlite-core/indexes.ts at line 25.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free