Struct ckb_db_migration::Migrations
source · pub struct Migrations { /* private fields */ }
Expand description
TODO(doc): @quake
Implementations§
source§impl Migrations
impl Migrations
sourcepub fn add_migration(&mut self, migration: Box<dyn Migration>)
pub fn add_migration(&mut self, migration: Box<dyn Migration>)
TODO(doc): @quake
sourcepub fn check(&self, db: &ReadOnlyDB) -> Ordering
pub fn check(&self, db: &ReadOnlyDB) -> Ordering
Check if database’s version is matched with the executable binary version.
Returns
- Less: The database version is less than the matched version of the executable binary. Requires migration.
- Equal: The database version is matched with the executable binary version.
- Greater: The database version is greater than the matched version of the executable binary. Requires upgrade the executable binary.
sourcepub fn expensive(&self, db: &ReadOnlyDB) -> bool
pub fn expensive(&self, db: &ReadOnlyDB) -> bool
Check if the migrations will consume a lot of time.
Trait Implementations§
source§impl Default for Migrations
impl Default for Migrations
source§fn default() -> Migrations
fn default() -> Migrations
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for Migrations
impl !Send for Migrations
impl !Sync for Migrations
impl Unpin for Migrations
impl !UnwindSafe for Migrations
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