Method DeleteWhereAsync<TKey, TRecord>
- Namespace
- Oscova.Agents.Vector
- Assembly
- Oscova.Agents.dll
DeleteWhereAsync<TKey, TRecord>(string, Expression<Func<TRecord, bool>>, Func<TRecord, TKey>, VectorStoreCollectionDefinition?, CancellationToken)
Deletes every record matching a filter in bounded batches.
public Task<int> DeleteWhereAsync<TKey, TRecord>(string collectionName, Expression<Func<TRecord, bool>> filter, Func<TRecord, TKey> keySelector, VectorStoreCollectionDefinition? definition = null, CancellationToken cancellationToken = default) where TKey : notnull where TRecord : classParameters
collectionNamestring-
The collection to update.
filterExpression<Func<TRecord, bool>>-
The record filter.
keySelectorFunc<TRecord, TKey>-
Selects the key used for deletion.
definitionVectorStoreCollectionDefinition?-
An optional collection definition used when opening the collection.
cancellationTokenCancellationToken-
Cancels enumeration and deletion.
Returns
Type Parameters
TKey-
The record key type.
TRecord-
The vector record type.