Home / File/ indexes.ts — drizzle-orm Source File

indexes.ts — drizzle-orm Source File

Architecture documentation for indexes.ts, a typescript file in the drizzle-orm codebase. 4 imports, 3 dependents.

File typescript DrizzleORM RelationalQuery 4 imports 3 dependents 2 functions 3 classes

Entity Profile

Dependency Diagram

graph LR
  8e96cfe7_b09e_acd6_1e9a_cf73dc90a16f["indexes.ts"]
  a2e1e4f4_2b6e_c197_a707_793466cb421f["index.ts"]
  8e96cfe7_b09e_acd6_1e9a_cf73dc90a16f --> a2e1e4f4_2b6e_c197_a707_793466cb421f
  cbe7af57_41be_454d_306f_02d0e6f81949["table.ts"]
  8e96cfe7_b09e_acd6_1e9a_cf73dc90a16f --> cbe7af57_41be_454d_306f_02d0e6f81949
  be483a7f_d5d7_7a9b_9a13_44a4a6aafbbd["sql.ts"]
  8e96cfe7_b09e_acd6_1e9a_cf73dc90a16f --> be483a7f_d5d7_7a9b_9a13_44a4a6aafbbd
  27705a9d_afe9_57dd_8c97_e52d8a67d426["entity.ts"]
  8e96cfe7_b09e_acd6_1e9a_cf73dc90a16f --> 27705a9d_afe9_57dd_8c97_e52d8a67d426
  a74dd48d_d5e3_6bb4_19c7_1954c9126816["common.ts"]
  a74dd48d_d5e3_6bb4_19c7_1954c9126816 --> 8e96cfe7_b09e_acd6_1e9a_cf73dc90a16f
  cbe7af57_41be_454d_306f_02d0e6f81949["table.ts"]
  cbe7af57_41be_454d_306f_02d0e6f81949 --> 8e96cfe7_b09e_acd6_1e9a_cf73dc90a16f
  9cb8488e_0ece_edef_af6a_5851d56cddda["utils.ts"]
  9cb8488e_0ece_edef_af6a_5851d56cddda --> 8e96cfe7_b09e_acd6_1e9a_cf73dc90a16f
  style 8e96cfe7_b09e_acd6_1e9a_cf73dc90a16f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { SQL } from '~/sql/sql.ts';

import { entityKind, is } from '~/entity.ts';
import type { GelColumn, GelExtraConfigColumn } from './columns/index.ts';
import { IndexedColumn } from './columns/index.ts';
import type { GelTable } 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 = GelColumn;

export type GelIndexMethod =
	| 'btree'
	| 'hash'
	| 'gist'
	| 'sGelist'
	| 'gin'
	| 'brin'
	| 'hnsw'
	| 'ivfflat'
	| (string & {});

export type GelIndexOpClass =
	| 'abstime_ops'
	| 'access_method'
	| 'anyarray_eq'
// ... (200 more lines)

Domain

Subdomains

Dependencies

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, RelationalQuery 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/gel-core/indexes.ts (domain: DrizzleORM, subdomain: RelationalQuery, directory: drizzle-orm/src/gel-core).

Analyze Your Own Codebase

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

Try Supermodel Free