Table of Contents

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: /tenantId for multi-tenant isolation
  • Aggregate-based: /aggregateId for event sourcing
  • Hierarchical: /tenantId/aggregateType for 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.