import { MastraVector } from '@mastra/core/vector'; import type { IndexStats, QueryResult, QueryVectorParams, CreateIndexParams, UpsertVectorParams, DescribeIndexParams, DeleteIndexParams, DeleteVectorParams, UpdateVectorParams, DeleteVectorsParams } from '@mastra/core/vector'; import type { DuckDBVectorConfig, DuckDBVectorFilter } from './types.js'; /** * DuckDB vector store implementation for Mastra. * * Provides embedded high-performance vector storage with HNSW indexing * using the DuckDB VSS extension for vector similarity search. * * Key features: * - Embedded database (no server required) * - HNSW indexing for fast similarity search * - SQL interface for metadata filtering * - Native Parquet support */ export declare class DuckDBVector extends MastraVector { private config; private instance; private initialized; private initPromise; constructor(config: DuckDBVectorConfig); /** * Initialize the database connection and load required extensions. */ private initialize; /** * Get a database connection. */ private getConnection; /** * Execute a SQL query and return results. */ private runQuery; /** * Execute a SQL statement without returning results. */ private runStatement; /** * Validate and escape a SQL identifier (table name, column name). */ private escapeIdentifier; /** * Get the distance function for the configured metric. */ private getDistanceFunction; /** Perform a vector similarity search with optional metadata filtering. */ query(params: QueryVectorParams): Promise; /** Insert or replace vectors with metadata. Returns the vector IDs. */ upsert(params: UpsertVectorParams): Promise; /** Create a vector table with HNSW index for similarity search. */ createIndex(params: CreateIndexParams): Promise; /** List all vector table names in the database. */ listIndexes(): Promise; /** Return dimension, row count, and metric for a vector index. */ describeIndex(params: DescribeIndexParams): Promise; /** Drop a vector table and its HNSW index. */ deleteIndex(params: DeleteIndexParams): Promise; /** Update a vector's embedding and/or metadata by ID or filter. */ updateVector(params: UpdateVectorParams): Promise; /** Delete a single vector by ID. */ deleteVector(params: DeleteVectorParams): Promise; /** Delete multiple vectors by IDs or metadata filter (mutually exclusive). */ deleteVectors(params: DeleteVectorsParams): Promise; /** * Close the database connection. * After closing, the vector store can be reused by calling methods that require initialization. */ close(): Promise; } //# sourceMappingURL=index.d.ts.map