You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
825 B
Rust

//! Stub implementations for commands not yet fully implemented.
use crate::error::Result;
use crate::tui::run::run_tui;
/// Run the `tui` subcommand.
///
/// Initialises the terminal, runs the interactive event loop, and restores
/// the terminal on exit.
pub fn tui() -> Result<()> {
run_tui()
}
/// Run the `query` subcommand stub.
///
/// Prints usage information until ad-hoc SQL querying is implemented.
pub fn query() -> Result<()> {
println!("query: coming soon!");
println!(" Usage: claudbg query <SQL>");
println!(" Runs ad-hoc queries against the session cache database.");
Ok(())
}
#[cfg(test)]
mod tests {
use super::*;
/// `query()` returns `Ok` without panicking.
#[test]
fn query_returns_ok() {
let result = query();
assert!(result.is_ok());
}
}