Table of Contents

Class Knn

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

Emits the one KNN shape sqlite-vec supports: <vector> MATCH ? AND k = ?. LIMIT n only works on SQLite 3.41+ and is deliberately not used.

public static class Knn
Inheritance
Knn
Inherited Members

Methods

BuildSql(string, string?, string)

Builds the SELECT rowid, distance FROM ... WHERE ... MATCH ? AND k = ? statement, optionally narrowed by where.

QueryAsync(SqliteConnection, string, ReadOnlyMemory<float>, int, string?, IEnumerable<SqliteParameter>?, string, CancellationToken)

Runs a KNN query against a vec0 table and returns the matched row ids and distances.