Home / Function/ existing() — drizzle-orm Function Reference

existing() — drizzle-orm Function Reference

Architecture documentation for the existing() function in view.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  9d77f300_f87c_c59f_b014_d4a74a19410f["existing()"]
  d29aec74_f4ac_d0e5_3b04_35e6a58ece69["ManualViewBuilder"]
  9d77f300_f87c_c59f_b014_d4a74a19410f -->|defined in| d29aec74_f4ac_d0e5_3b04_35e6a58ece69
  style 9d77f300_f87c_c59f_b014_d4a74a19410f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/gel-core/view.ts lines 92–110

	existing(): GelViewWithSelection<TName, true, BuildColumns<TName, TColumns, 'gel'>> {
		return new Proxy(
			new GelView({
				GelConfig: undefined,
				config: {
					name: this.name,
					schema: this.schema,
					selectedFields: this.columns,
					query: undefined,
				},
			}),
			new SelectionProxyHandler({
				alias: this.name,
				sqlBehavior: 'error',
				sqlAliasedBehavior: 'alias',
				replaceOriginalName: true,
			}),
		) as GelViewWithSelection<TName, true, BuildColumns<TName, TColumns, 'gel'>>;
	}

Domain

Subdomains

Frequently Asked Questions

What does existing() do?
existing() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/gel-core/view.ts.
Where is existing() defined?
existing() is defined in drizzle-orm/src/gel-core/view.ts at line 92.

Analyze Your Own Codebase

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

Try Supermodel Free