indexes.ts — drizzle-orm Source File
Architecture documentation for indexes.ts, a typescript file in the drizzle-orm codebase. 4 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR e43c7978_6183_5be1_2adb_a463e29db8ba["indexes.ts"] c2ee5a75_b49e_5e5a_3712_97b1b67b4a7b["index.ts"] e43c7978_6183_5be1_2adb_a463e29db8ba --> c2ee5a75_b49e_5e5a_3712_97b1b67b4a7b 3c5f95cc_22b6_3d0d_d9be_3e274450e9e7["table.ts"] e43c7978_6183_5be1_2adb_a463e29db8ba --> 3c5f95cc_22b6_3d0d_d9be_3e274450e9e7 27705a9d_afe9_57dd_8c97_e52d8a67d426["entity.ts"] e43c7978_6183_5be1_2adb_a463e29db8ba --> 27705a9d_afe9_57dd_8c97_e52d8a67d426 be483a7f_d5d7_7a9b_9a13_44a4a6aafbbd["sql.ts"] e43c7978_6183_5be1_2adb_a463e29db8ba --> be483a7f_d5d7_7a9b_9a13_44a4a6aafbbd 3c5f95cc_22b6_3d0d_d9be_3e274450e9e7["table.ts"] 3c5f95cc_22b6_3d0d_d9be_3e274450e9e7 --> e43c7978_6183_5be1_2adb_a463e29db8ba ae5f6568_e61c_e2e0_88cb_92eabc9ba98e["utils.ts"] ae5f6568_e61c_e2e0_88cb_92eabc9ba98e --> e43c7978_6183_5be1_2adb_a463e29db8ba style e43c7978_6183_5be1_2adb_a463e29db8ba fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { entityKind } from '~/entity.ts';
import type { SQL } from '~/sql/sql.ts';
import type { AnySingleStoreColumn, SingleStoreColumn } from './columns/index.ts';
import type { SingleStoreTable } from './table.ts';
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';
}
export type IndexColumn = SingleStoreColumn | SQL;
export class IndexBuilderOn {
static readonly [entityKind]: string = 'SingleStoreIndexBuilderOn';
constructor(private name: string, private unique: boolean) {}
on(...columns: [IndexColumn, ...IndexColumn[]]): IndexBuilder {
return new IndexBuilder(this.name, columns, this.unique);
}
}
export interface AnyIndexBuilder {
build(table: SingleStoreTable): Index;
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface IndexBuilder extends AnyIndexBuilder {}
export class IndexBuilder implements AnyIndexBuilder {
static readonly [entityKind]: string = 'SingleStoreIndexBuilder';
/** @internal */
config: IndexConfig;
constructor(name: string, columns: IndexColumn[], unique: boolean) {
this.config = {
name,
columns,
// ... (134 more lines)
Domain
Subdomains
Classes
Source
Frequently Asked Questions
What does indexes.ts do?
indexes.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain, QueryBuilders subdomain.
What does indexes.ts depend on?
indexes.ts imports 4 module(s): entity.ts, index.ts, sql.ts, table.ts.
What files import indexes.ts?
indexes.ts is imported by 2 file(s): table.ts, utils.ts.
Where is indexes.ts in the architecture?
indexes.ts is located at drizzle-orm/src/singlestore-core/indexes.ts (domain: DrizzleORM, subdomain: QueryBuilders, directory: drizzle-orm/src/singlestore-core).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free