Method BuildSql
BuildSql(string, string?, string)
Builds the SELECT rowid, distance FROM ... WHERE ... MATCH ? AND k = ? statement, optionally narrowed by where.
public static string BuildSql(string table, string? where = null, string vectorColumn = "embedding")
Parameters
tablestringThe
vec0table to query.wherestringAn additional
AND-joined predicate (metadata or partition-key filters), or null for none.vectorColumnstringThe vector column's name.
Returns
- string
The complete KNN
SELECTstatement.
Exceptions
- ArgumentException
tableorvectorColumnis null, empty, or whitespace.