Home / Function/ GelSquasher.unsquashIdx() — drizzle-orm Function Reference

GelSquasher.unsquashIdx() — drizzle-orm Function Reference

Architecture documentation for the GelSquasher.unsquashIdx() function in gelSchema.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  919dd33e_31aa_cd5e_c6bf_509fcc4eb02a["GelSquasher.unsquashIdx()"]
  964b24c5_3481_bed3_69f7_b6e4cefe58bb["gelSchema.ts"]
  919dd33e_31aa_cd5e_c6bf_509fcc4eb02a -->|defined in| 964b24c5_3481_bed3_69f7_b6e4cefe58bb
  style 919dd33e_31aa_cd5e_c6bf_509fcc4eb02a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-kit/src/serializer/gelSchema.ts lines 309–344

	unsquashIdx: (input: string): Index => {
		const [
			name,
			columnsString,
			isUnique,
			concurrently,
			method,
			where,
			idxWith,
		] = input.split(';');

		const columnString = columnsString.split(',,');
		const columns: IndexColumnType[] = [];

		for (const column of columnString) {
			const [expression, isExpression, asc, nulls, opclass] = column.split('--');
			columns.push({
				nulls: nulls as IndexColumnType['nulls'],
				isExpression: isExpression === 'true',
				asc: asc === 'true',
				expression: expression,
				opclass: opclass === 'undefined' ? undefined : opclass,
			});
		}

		const result: Index = index.parse({
			name,
			columns: columns,
			isUnique: isUnique === 'true',
			concurrently: concurrently === 'true',
			method,
			where: where === 'undefined' ? undefined : where,
			with: !idxWith || idxWith === 'undefined' ? undefined : JSON.parse(idxWith),
		});
		return result;
	},

Domain

Subdomains

Frequently Asked Questions

What does GelSquasher.unsquashIdx() do?
GelSquasher.unsquashIdx() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/serializer/gelSchema.ts.
Where is GelSquasher.unsquashIdx() defined?
GelSquasher.unsquashIdx() is defined in drizzle-kit/src/serializer/gelSchema.ts at line 309.

Analyze Your Own Codebase

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

Try Supermodel Free