Interface ISchemaEvolutionHandler
- Namespace
- Excalibur.Data.ElasticSearch.Projections
- Assembly
- Excalibur.Data.ElasticSearch.dll
Manages schema evolution and migrations for ElasticSearch projections.
public interface ISchemaEvolutionHandler
Methods
CompareSchemaAsync(string, string, CancellationToken)
Analyzes schema differences between source and target indices.
Task<SchemaComparisonResult> CompareSchemaAsync(string sourceIndex, string targetIndex, CancellationToken cancellationToken)
Parameters
sourceIndexstringThe source index name.
targetIndexstringThe target index name or mapping.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<SchemaComparisonResult>
A schema comparison result detailing the differences.
DryRunMigrationAsync(SchemaMigrationPlan, int, CancellationToken)
Performs a dry run of a schema migration without applying changes.
Task<SchemaMigrationDryRunResult> DryRunMigrationAsync(SchemaMigrationPlan plan, int sampleSize, CancellationToken cancellationToken)
Parameters
planSchemaMigrationPlanThe migration plan to test.
sampleSizeintThe number of documents to test with.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<SchemaMigrationDryRunResult>
The dry run results.
ExecuteMigrationAsync(SchemaMigrationPlan, CancellationToken)
Executes a schema migration plan.
Task<SchemaMigrationResult> ExecuteMigrationAsync(SchemaMigrationPlan plan, CancellationToken cancellationToken)
Parameters
planSchemaMigrationPlanThe migration plan to execute.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<SchemaMigrationResult>
The result of the migration execution.
PlanMigrationAsync(SchemaMigrationRequest, CancellationToken)
Plans a schema migration from one version to another.
Task<SchemaMigrationPlan> PlanMigrationAsync(SchemaMigrationRequest request, CancellationToken cancellationToken)
Parameters
requestSchemaMigrationRequestThe migration planning request.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<SchemaMigrationPlan>
A migration plan detailing the steps required.
ValidateBackwardsCompatibilityAsync(object, object, CancellationToken)
Validates that a schema change is backwards compatible.
Task<SchemaCompatibilityResult> ValidateBackwardsCompatibilityAsync(object currentSchema, object newSchema, CancellationToken cancellationToken)
Parameters
currentSchemaobjectThe current schema definition.
newSchemaobjectThe proposed new schema definition.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<SchemaCompatibilityResult>
A validation result indicating compatibility.