pub enum DatabaseCommand {
Backup,
Reset {
force: bool,
},
Upgrade {
force: bool,
},
Compact,
Cutover {
dry_run: bool,
force: bool,
},
Heal {
dry_run: bool,
force: bool,
},
Inspect,
}Expand description
The database command group (the template group; ports
src/degenbot/cli/database.py arm for arm).
Variants§
Backup
Back up the database to its .db.bak sibling. Confirms replacement only
when the target already exists.
Reset
Remove and recreate the database (confirms unless --force).
Upgrade
RETIRED: render the pointed-retirement error and exit 1. The database upgrades itself at open (ADR-052).
Compact
Compact the database (VACUUM); never prompts.
Cutover
Flip an Alembic-stamped DB into Rust schema ownership (ADR-010).
Fields
Heal
Rebuild an Alembic-stamped DB into Rust ownership out-of-place (ADR-011).
Fields
Inspect
Read-only schema-state inspection; never triggers a write.
Implementations§
Source§impl DatabaseCommand
impl DatabaseCommand
Sourcepub fn prompt_plan(&self, ctx: &CliContext<'_>) -> PromptPlan
pub fn prompt_plan(&self, ctx: &CliContext<'_>) -> PromptPlan
The arm’s declared confirmation policy — ported verbatim from the click handlers (backup: replace-target-exists; reset/cutover/heal: unless-force; compact/inspect: none).
upgrade reports PromptPlan::UnlessForce for argv parity with the
retired handler, but its arm returns CliError::DatabaseUpgradeRetired
before any prompt is reached.
Trait Implementations§
Source§impl Clone for DatabaseCommand
impl Clone for DatabaseCommand
Source§fn clone(&self) -> DatabaseCommand
fn clone(&self) -> DatabaseCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DatabaseCommand
impl Debug for DatabaseCommand
impl Eq for DatabaseCommand
Source§impl PartialEq for DatabaseCommand
impl PartialEq for DatabaseCommand
impl StructuralPartialEq for DatabaseCommand
Auto Trait Implementations§
impl Freeze for DatabaseCommand
impl RefUnwindSafe for DatabaseCommand
impl Send for DatabaseCommand
impl Sync for DatabaseCommand
impl Unpin for DatabaseCommand
impl UnsafeUnpin for DatabaseCommand
impl UnwindSafe for DatabaseCommand
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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