Interface IPartitionKey
- Namespace
- Excalibur.Data.CloudNative
- Assembly
- Excalibur.Data.Abstractions.dll
Represents a partition key for cloud-native document databases.
public interface IPartitionKey
Remarks
Cloud-native document databases (Cosmos DB, DynamoDB, Firestore) require partition keys for data distribution and query optimization. This interface provides a provider-agnostic abstraction for partition key strategies.
Common Partition Strategies:
- Tenant-based:
/tenantIdfor multi-tenant isolation - Aggregate-based:
/aggregateIdfor event sourcing - Hierarchical:
/tenantId/aggregateTypefor complex scenarios
Properties
Path
Gets the partition key path (e.g., "/tenantId" for Cosmos DB).
string Path { get; }
Property Value
- string
The path expression for the partition key field.
Value
Gets the partition key value.
string Value { get; }
Property Value
- string
The partition key value as a string.