Interface IAzureCosmosDBServiceBase
- Namespace
- FoundationaLLM.Context.Interfaces
- Assembly
- FoundationaLLM.Context.dll
Defines the interface for the Azure Cosmos DB service that provides core database services.
public interface IAzureCosmosDBServiceBase
- Extension Methods
Properties
ContextContainer
Gets the context container for the Azure Cosmos DB service.
Container ContextContainer { get; }
Property Value
Methods
RetrieveItems<T>(QueryDefinition)
Retrieves items from Azure Cosmos DB.
Task<List<T>> RetrieveItems<T>(QueryDefinition query)
Parameters
query
QueryDefinitionThe query definition used to retrieve the items.
Returns
Type Parameters
T
The type of item to retrieve.
UpsertItemAsync<T>(string, T, CancellationToken)
Upserts an item in Azure Cosmos DB.
Task<T> UpsertItemAsync<T>(string partitionKey, T item, CancellationToken cancellationToken = default)
Parameters
partitionKey
stringThe partition of the item to upsert.
item
TThe item to upsert.
cancellationToken
CancellationTokenThe cancellation token used to signal a cancellation request.
Returns
- Task<T>
The upserted item.
Type Parameters
T
The type of the item to upsert.