Table of Contents

Method BuildSql

Namespace
Qavren.Edge.Sqlite.Vec
Assembly
Qavren.Edge.Sqlite.dll

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

table string

The vec0 table to query.

where string

An additional AND-joined predicate (metadata or partition-key filters), or null for none.

vectorColumn string

The vector column's name.

Returns

string

The complete KNN SELECT statement.

Exceptions

ArgumentException

table or vectorColumn is null, empty, or whitespace.