29 lines
1.1 KiB
TypeScript
29 lines
1.1 KiB
TypeScript
/**
|
|
* Node.js-specific exports for @ruvector/wasm
|
|
*/
|
|
import type { VectorEntry, SearchResult, DbOptions } from './index';
|
|
/**
|
|
* VectorDB class for Node.js
|
|
*/
|
|
export declare class VectorDB {
|
|
private db;
|
|
private dimensions;
|
|
constructor(options: DbOptions);
|
|
init(): Promise<void>;
|
|
insert(vector: Float32Array | number[], id?: string, metadata?: Record<string, any>): string;
|
|
insertBatch(entries: VectorEntry[]): string[];
|
|
search(query: Float32Array | number[], k: number, filter?: Record<string, any>): SearchResult[];
|
|
delete(id: string): boolean;
|
|
get(id: string): VectorEntry | null;
|
|
len(): number;
|
|
isEmpty(): boolean;
|
|
getDimensions(): number;
|
|
saveToFile(path: string): Promise<void>;
|
|
static loadFromFile(path: string, options: DbOptions): Promise<VectorDB>;
|
|
}
|
|
export declare function detectSIMD(): Promise<boolean>;
|
|
export declare function version(): Promise<string>;
|
|
export declare function benchmark(name: string, iterations: number, dimensions: number): Promise<number>;
|
|
export type { VectorEntry, SearchResult, DbOptions };
|
|
export default VectorDB;
|
|
//# sourceMappingURL=node.d.ts.map
|