Interface: VectorStore()
Defined in: src/batteries/vector/contract.ts:31
The public surface every vector store exposes: capability flags, lifecycle (connect/close), a callable form that opens a VectorQueryBuilder for a collection, schema access, and an optional transaction wrapper. Adapters extend BaseVectorStore, which implements this plus the low-level plan/schema executor contracts.
Extends
VectorStore(collection: string): VectorQueryBuilder;Defined in: src/batteries/vector/contract.ts:41
Callable form: store('collection') returns a query builder scoped to that collection.
Parameters
| Parameter | Type |
|---|---|
collection | string |
Returns
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
capabilities | readonly | VectorStoreCapabilities | Static description of what this backend supports (built-in encoding, transactions, filters, etc.). | src/batteries/vector/contract.ts:33 |
schema | public | VectorSchemaBuilder | Schema builder for creating, dropping, and migrating collections. | src/batteries/vector/contract.ts:43 |
Methods
close()
close(): Promise<void>;Defined in: src/batteries/vector/contract.ts:39
Release the backing connection and any held resources.
Returns
Promise<void>
connect()
connect(): Promise<void>;Defined in: src/batteries/vector/contract.ts:37
Open the backing connection (clients, pools, sockets).
Returns
Promise<void>
createCollection()
createCollection(spec: CollectionSpec, ifNotExists: boolean): Promise<void>;Defined in: src/batteries/vector/schema.ts:16
Create a collection from spec; ifNotExists suppresses the already-exists error.
Parameters
| Parameter | Type |
|---|---|
spec | CollectionSpec |
ifNotExists | boolean |
Returns
Promise<void>
Inherited from
SchemaExecutor.createCollection
dropCollection()
dropCollection(collection: string, ifExists: boolean): Promise<void>;Defined in: src/batteries/vector/schema.ts:18
Drop a collection; ifExists suppresses the not-found error.
Parameters
| Parameter | Type |
|---|---|
collection | string |
ifExists | boolean |
Returns
Promise<void>
Inherited from
executeDelete()
executeDelete(plan: DeletePlan): Promise<void>;Defined in: src/batteries/vector/builder.ts:57
Executes an assembled delete plan.
Parameters
| Parameter | Type |
|---|---|
plan | DeletePlan |
Returns
Promise<void>
Inherited from
executeSearch()
executeSearch(plan: SearchPlan): Promise<VectorMatch[]>;Defined in: src/batteries/vector/builder.ts:53
Executes an assembled search plan and resolves the matching records.
Parameters
| Parameter | Type |
|---|---|
plan | SearchPlan |
Returns
Promise<VectorMatch[]>
Inherited from
executeUpsert()
executeUpsert(plan: UpsertPlan): Promise<void>;Defined in: src/batteries/vector/builder.ts:55
Executes an assembled upsert plan.
Parameters
| Parameter | Type |
|---|---|
plan | UpsertPlan |
Returns
Promise<void>
Inherited from
hasCollection()
hasCollection(collection: string): Promise<boolean>;Defined in: src/batteries/vector/schema.ts:20
Resolve true if the collection exists.
Parameters
| Parameter | Type |
|---|---|
collection | string |
Returns
Promise<boolean>
Inherited from
isAvailable()
isAvailable(): boolean;Defined in: src/batteries/vector/contract.ts:35
Whether the backend's optional peer dependency is installed and the store is usable.
Returns
boolean
renameCollection()
renameCollection(from: string, to: string): Promise<void>;Defined in: src/batteries/vector/schema.ts:22
Rename a collection from from to to.
Parameters
| Parameter | Type |
|---|---|
from | string |
to | string |
Returns
Promise<void>
Inherited from
SchemaExecutor.renameCollection
transaction()
transaction(fn: (tx: VectorStore) => Promise<void>): Promise<void>;Defined in: src/batteries/vector/contract.ts:45
Run fn inside a backend transaction, where supported; rejects otherwise.
Parameters
| Parameter | Type |
|---|---|
fn | (tx: VectorStore) => Promise<void> |
Returns
Promise<void>