Method DeleteAsync
- Namespace
- Qavren.Edge.VectorData
- Assembly
- Qavren.Edge.VectorData.dll
DeleteAsync(TKey, CancellationToken)
Deletes a record from the vector store. Does not guarantee that the collection exists.
public override Task DeleteAsync(TKey key, CancellationToken cancellationToken = default)
Parameters
keyTKeyThe unique ID associated with the record to remove.
cancellationTokenCancellationTokenThe CancellationToken to monitor for cancellation requests. The default is None.
Returns
- Task
The unique identifier for the record.
Exceptions
- VectorStoreException
The command fails to execute for any reason other than that the record does not exist.
DeleteAsync(IEnumerable<TKey>, CancellationToken)
Deletes by key from the data table only: DELETE FROM "notes" WHERE "Key" = $key. The
four triggers clean vec0 and FTS5, so no orphan survives even when an app deletes rows with
its own SQL against the same IEdgeDatabase.
public override Task DeleteAsync(IEnumerable<TKey> keys, CancellationToken cancellationToken = default)
Parameters
keysIEnumerable<TKey>The keys to delete. A key that is not present is not an error.
cancellationTokenCancellationTokenCancels the work.
Returns
- Task
A task that completes when the transaction has committed.