l2Distance() — drizzle-orm Function Reference
Architecture documentation for the l2Distance() function in vector.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 88129aa9_776c_797a_e182_fe13099fd3bb["l2Distance()"] d155802d_6bf7_144f_94a8_70b957517dac["vector.ts"] 88129aa9_776c_797a_e182_fe13099fd3bb -->|defined in| d155802d_6bf7_144f_94a8_70b957517dac 2f117b41_7784_e39d_7d88_f5fa5ffeaa3e["toSql()"] 88129aa9_776c_797a_e182_fe13099fd3bb -->|calls| 2f117b41_7784_e39d_7d88_f5fa5ffeaa3e style 88129aa9_776c_797a_e182_fe13099fd3bb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/sql/functions/vector.ts lines 31–39
export function l2Distance(
column: SQLWrapper | AnyColumn,
value: number[] | string[] | TypedQueryBuilder<any> | string,
): SQL {
if (Array.isArray(value)) {
return sql`${column} <-> ${toSql(value)}`;
}
return sql`${column} <-> ${value}`;
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does l2Distance() do?
l2Distance() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/sql/functions/vector.ts.
Where is l2Distance() defined?
l2Distance() is defined in drizzle-orm/src/sql/functions/vector.ts at line 31.
What does l2Distance() call?
l2Distance() calls 1 function(s): toSql.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free