indexes.ts — drizzle-orm Source File
Architecture documentation for indexes.ts, a typescript file in the drizzle-orm codebase. 4 imports, 3 dependents.
Entity Profile
Dependency Diagram
graph LR a406baef_d8bd_9bc9_efcd_e7c1450622b0["indexes.ts"] b5f68e91_0c18_4699_4724_dcbb5d28898e["index.ts"] a406baef_d8bd_9bc9_efcd_e7c1450622b0 --> b5f68e91_0c18_4699_4724_dcbb5d28898e 2d5c8884_973c_561c_def6_5e394ea36d1a["table.ts"] a406baef_d8bd_9bc9_efcd_e7c1450622b0 --> 2d5c8884_973c_561c_def6_5e394ea36d1a be483a7f_d5d7_7a9b_9a13_44a4a6aafbbd["sql.ts"] a406baef_d8bd_9bc9_efcd_e7c1450622b0 --> be483a7f_d5d7_7a9b_9a13_44a4a6aafbbd 27705a9d_afe9_57dd_8c97_e52d8a67d426["entity.ts"] a406baef_d8bd_9bc9_efcd_e7c1450622b0 --> 27705a9d_afe9_57dd_8c97_e52d8a67d426 f4f42b4c_8610_03dd_fe01_232098668127["common.ts"] f4f42b4c_8610_03dd_fe01_232098668127 --> a406baef_d8bd_9bc9_efcd_e7c1450622b0 2d5c8884_973c_561c_def6_5e394ea36d1a["table.ts"] 2d5c8884_973c_561c_def6_5e394ea36d1a --> a406baef_d8bd_9bc9_efcd_e7c1450622b0 ce49a5a3_688d_ddce_fd32_28428e51cae2["utils.ts"] ce49a5a3_688d_ddce_fd32_28428e51cae2 --> a406baef_d8bd_9bc9_efcd_e7c1450622b0 style a406baef_d8bd_9bc9_efcd_e7c1450622b0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { SQL } from '~/sql/sql.ts';
import { entityKind, is } from '~/entity.ts';
import type { ExtraConfigColumn, PgColumn } from './columns/index.ts';
import { IndexedColumn } from './columns/index.ts';
import type { PgTable } from './table.ts';
interface IndexConfig {
name?: string;
columns: Partial<IndexedColumn | SQL>[];
/**
* If true, the index will be created as `create unique index` instead of `create index`.
*/
unique: boolean;
/**
* If true, the index will be created as `create index concurrently` instead of `create index`.
*/
concurrently?: boolean;
/**
* If true, the index will be created as `create index ... on only <table>` instead of `create index ... on <table>`.
*/
only: boolean;
/**
* Condition for partial index.
*/
where?: SQL;
/**
* The optional WITH clause specifies storage parameters for the index
*/
with?: Record<string, any>;
/**
* The optional WITH clause method for the index
*/
method?: 'btree' | string;
}
export type IndexColumn = PgColumn;
export type PgIndexMethod = 'btree' | 'hash' | 'gist' | 'spgist' | 'gin' | 'brin' | 'hnsw' | 'ivfflat' | (string & {});
export type PgIndexOpClass =
| 'abstime_ops'
| 'access_method'
| 'anyarray_eq'
| 'anyarray_ge'
| 'anyarray_gt'
| 'anyarray_le'
| 'anyarray_lt'
| 'anyarray_ne'
| 'bigint_ops'
| 'bit_ops'
| 'bool_ops'
| 'box_ops'
// ... (192 more lines)
Domain
Subdomains
Functions
Classes
Types
Imported By
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, DatabaseDrivers subdomain.
What functions are defined in indexes.ts?
indexes.ts defines 2 function(s): index, uniqueIndex.
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 3 file(s): common.ts, table.ts, utils.ts.
Where is indexes.ts in the architecture?
indexes.ts is located at drizzle-orm/src/pg-core/indexes.ts (domain: DrizzleORM, subdomain: DatabaseDrivers, directory: drizzle-orm/src/pg-core).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free