pub struct SchemaEvolutionManager { /* private fields */ }Expand description
Schema evolution manager that wraps a registry with additional features
Implementations§
Source§impl SchemaEvolutionManager
impl SchemaEvolutionManager
pub fn new() -> Self
Sourcepub fn evolve_schema(
&mut self,
name: &str,
changes: Vec<SchemaChange>,
) -> Result<SchemaVersion>
pub fn evolve_schema( &mut self, name: &str, changes: Vec<SchemaChange>, ) -> Result<SchemaVersion>
Create a new schema version with changes from current
Sourcepub fn migrate_row(&self, name: &str, row: VersionedRow) -> Result<VersionedRow>
pub fn migrate_row(&self, name: &str, row: VersionedRow) -> Result<VersionedRow>
Migrate a versioned row to current schema
Sourcepub fn schedule_background_migration(
&mut self,
name: impl Into<String>,
from_version: SchemaVersion,
row_count: usize,
)
pub fn schedule_background_migration( &mut self, name: impl Into<String>, from_version: SchemaVersion, row_count: usize, )
Schedule background migration for old rows
Sourcepub fn pending_migrations(&self) -> &[(String, SchemaVersion, usize)]
pub fn pending_migrations(&self) -> &[(String, SchemaVersion, usize)]
Get pending background migrations
Sourcepub fn registry(&self) -> &SchemaRegistry
pub fn registry(&self) -> &SchemaRegistry
Access the underlying registry
Sourcepub fn registry_mut(&mut self) -> &mut SchemaRegistry
pub fn registry_mut(&mut self) -> &mut SchemaRegistry
Access the underlying registry mutably
Sourcepub fn stats(&self) -> Arc<EvolutionStats>
pub fn stats(&self) -> Arc<EvolutionStats>
Get evolution statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SchemaEvolutionManager
impl RefUnwindSafe for SchemaEvolutionManager
impl Send for SchemaEvolutionManager
impl Sync for SchemaEvolutionManager
impl Unpin for SchemaEvolutionManager
impl UnwindSafe for SchemaEvolutionManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more