MediaPipeTasksRetrieval Framework Reference

SqliteVectorStore

class SqliteVectorStore : NSObject

Vector store implementation backed by a persistent SQLite database using the native SQLite vector engine.

  • Filesystem path to the SQLite database file.

    Declaration

    Swift

    var databasePath: String { get }
  • Initializes a SqliteVectorStore with a local SQLite database file path and embedding dimension.

    Declaration

    Swift

    init(databasePath: String, embeddingDimension: Int)
  • Inserts or updates records in the vector store.

    Declaration

    Swift

    func upsertRecords(_ records: [RetrievalRecord]) throws
  • Searches the top-K nearest records matching the query embedding.

    Declaration

    Swift

    func search(withEmbedding queryEmbedding: [NSNumber], topK: Int, metadataFilter: [String : String]?) throws -> [RetrievalRecord]
  • Deletes records matching the given IDs.

    Declaration

    Swift

    func delete(withIds ids: [String]) throws
  • Deletes all records from the vector store.

    Declaration

    Swift

    func deleteAllRecords() throws