Skip to content

Commit

Permalink
fix(bolt): add forwarded and persistent db shells (#1130)
Browse files Browse the repository at this point in the history
<!-- Please make sure there is an issue that this PR is correlated to. -->
Fixes RVTEE-593
## Changes

<!-- If there are frontend changes, please include screenshots. -->
  • Loading branch information
MasterPtato committed Sep 29, 2024
1 parent 06d965b commit f9b6707
Show file tree
Hide file tree
Showing 5 changed files with 361 additions and 279 deletions.
9 changes: 8 additions & 1 deletion lib/bolt/cli/src/commands/db/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,25 @@ pub enum SubCommand {
service: String,
#[clap(short = 'q', long)]
query: Option<String>,
#[clap(short = 'f', long)]
forwarded: bool,
},
}

impl SubCommand {
pub async fn execute(self, ctx: ProjectContext) -> Result<()> {
match self {
Self::Migrate { command } => command.execute(ctx).await,
Self::Shell { service, query } => {
Self::Shell {
service,
query,
forwarded,
} => {
tasks::db::shell(
&ctx,
&ctx.service_with_name(&service).await,
query.as_deref(),
forwarded,
)
.await?;

Expand Down
Loading

0 comments on commit f9b6707

Please sign in to comment.