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

GelSquasher.unsquashIdxPush() — drizzle-orm Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

drizzle-kit/src/serializer/gelSchema.ts lines 353–378

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

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

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

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

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free