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 6445d9e1_77f2_40aa_77c4_9c61ce1b7aef["IndexBuilder"] 8e96cfe7_b09e_acd6_1e9a_cf73dc90a16f["indexes.ts"] 6445d9e1_77f2_40aa_77c4_9c61ce1b7aef -->|defined in| 8e96cfe7_b09e_acd6_1e9a_cf73dc90a16f 8092af2d_db89_05e1_7e61_aafdbf30dbb7["constructor()"] 6445d9e1_77f2_40aa_77c4_9c61ce1b7aef -->|method| 8092af2d_db89_05e1_7e61_aafdbf30dbb7 b829a8ac_e42c_3109_d229_4fdacb7ea951["concurrently()"] 6445d9e1_77f2_40aa_77c4_9c61ce1b7aef -->|method| b829a8ac_e42c_3109_d229_4fdacb7ea951 5c853044_0299_2608_35f4_1bedfdbbf666["with()"] 6445d9e1_77f2_40aa_77c4_9c61ce1b7aef -->|method| 5c853044_0299_2608_35f4_1bedfdbbf666 893ea090_7834_41bd_d9e6_54882f4c778c["where()"] 6445d9e1_77f2_40aa_77c4_9c61ce1b7aef -->|method| 893ea090_7834_41bd_d9e6_54882f4c778c 28d60156_87df_8239_fdec_5d5862afc6e9["build()"] 6445d9e1_77f2_40aa_77c4_9c61ce1b7aef -->|method| 28d60156_87df_8239_fdec_5d5862afc6e9
Relationship Graph
Source Code
drizzle-orm/src/gel-core/indexes.ts lines 196–237
export class IndexBuilder implements AnyIndexBuilder {
static readonly [entityKind]: string = 'GelIndexBuilder';
/** @internal */
config: IndexConfig;
constructor(
columns: Partial<IndexedColumn | SQL>[],
unique: boolean,
only: boolean,
name?: string,
method: string = 'btree',
) {
this.config = {
name,
columns,
unique,
only,
method,
};
}
concurrently(): this {
this.config.concurrently = true;
return this;
}
with(obj: Record<string, any>): this {
this.config.with = obj;
return this;
}
where(condition: SQL): this {
this.config.where = condition;
return this;
}
/** @internal */
build(table: GelTable): 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/gel-core/indexes.ts.
Where is IndexBuilder defined?
IndexBuilder is defined in drizzle-orm/src/gel-core/indexes.ts at line 196.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free