hammingDistance() — drizzle-orm Function Reference
Architecture documentation for the hammingDistance() function in vector.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD f0bed738_bf36_81b9_1672_ba1aad7df28e["hammingDistance()"] d155802d_6bf7_144f_94a8_70b957517dac["vector.ts"] f0bed738_bf36_81b9_1672_ba1aad7df28e -->|defined in| d155802d_6bf7_144f_94a8_70b957517dac 2f117b41_7784_e39d_7d88_f5fa5ffeaa3e["toSql()"] f0bed738_bf36_81b9_1672_ba1aad7df28e -->|calls| 2f117b41_7784_e39d_7d88_f5fa5ffeaa3e style f0bed738_bf36_81b9_1672_ba1aad7df28e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/sql/functions/vector.ts lines 150–158
export function hammingDistance(
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 hammingDistance() do?
hammingDistance() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/sql/functions/vector.ts.
Where is hammingDistance() defined?
hammingDistance() is defined in drizzle-orm/src/sql/functions/vector.ts at line 150.
What does hammingDistance() call?
hammingDistance() 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