/** * @module @nhtio/adk/batteries/vector/oracle23ai * * Oracle 23ai AI Vector Search adapter. Vectors live in a `VECTOR(dims, FLOAT32)` column * written with `DB_TYPE_VECTOR` (oracledb thin mode, default) and read back as Float32Array. * KNN search uses `VECTOR_DISTANCE(vec, :q, COSINE|EUCLIDEAN|DOT)` ordered ascending. Metadata * is a CLOB containing a JSON string, filtered with the neutral evaluator for exact cross-adapter * parity. Each collection maps to a table named `` with double-quoted * identifiers for safety. * * The connecting user must default to a non-SYSTEM tablespace (e.g. USERS) and have CREATE TABLE. * Oracle 23ai provides strong consistency: commits are synchronous, so there is no settle-poll. * * Score contract: do NOT trust the raw VECTOR_DISTANCE as a [0,1] score. Instead, use SQL only to * order candidates, then recompute the [0,1] similarity locally using the stored `vec` and the * computeScore helper, ensuring the [0,1] contract regardless of metric semantics. * * Driver: `oracledb` (pure-JS thin mode, no Instant Client required). */ import { BaseVectorStore } from "../contract"; import type { SearchPlan, UpsertPlan, DeletePlan, CollectionSpec } from "../plan"; import type { VectorMatch, VectorStoreCapabilities, BaseVectorStoreOptions } from "../types"; export interface Oracle23aiVectorStoreOptions extends BaseVectorStoreOptions { /** Connection and authentication parameters for the backend. */ connection: { connectString: string; user: string; password: string; tablePrefix?: string; }; } export declare class Oracle23aiVectorStore extends BaseVectorStore { #private; readonly capabilities: VectorStoreCapabilities; /** Static availability probe: whether this adapter's runtime driver can load in the current environment. */ static isAvailable(): boolean; isAvailable(): boolean; connect(): Promise; close(): Promise; createCollection(spec: CollectionSpec, ifNotExists: boolean): Promise; dropCollection(collection: string, ifExists: boolean): Promise; hasCollection(collection: string): Promise; renameCollection(_from: string, _to: string): Promise; executeUpsert(plan: UpsertPlan): Promise; executeSearch(plan: SearchPlan): Promise; executeDelete(plan: DeletePlan): Promise; }