pub async fn run(&mut self) -> Result<()> {
        println!("Ready for commands. (Hint: try 'help;')");
        loop {
            match self.next_command()? {
                ReplCommand::Help => {
                    self.print_help();
                }
                ReplCommand::Observer {} => {
                    self.use_observer()
                        .await
                        .map_err(|e| println!("{}", e))
                        .ok();
                }
                ReplCommand::ShowNamespaces => {
                    self.list_namespaces()
                        .await
                        .map_err(|e| println!("{}", e))
                        .ok();
                }
                ReplCommand::UseDatabase { db_name } => {
                    self.use_database(db_name);
                }
                ReplCommand::SqlCommand { sql } => {
                    self.run_sql(sql).await.map_err(|e| println!("{}", e)).ok();
                }
                ReplCommand::Exit => {
                    info!("exiting at user request");
                    return Ok(());
                }
                ReplCommand::SetFormat { format } => {
                    self.set_output_format(format)?;
                }
            }
        }
    }
/// Read Evaluate Print Loop (interactive command line) for SQL
///
/// Inspired / based on repl.rs from DataFusion
Read Evaluate Print Loop (interactive command line) for SQL
Inspired / based on repl.rs from DataFusion
Read Evaluate Print Loop ( interactive command line ) for SQL Inspired / based on repl . rs from DataFusion
pub async fn run(&mut self) -> Result<()> {
        println!("Ready for commands. (Hint: try 'help;')");
        loop {
            match self.next_command()? {
                ReplCommand::Help => {
                    self.print_help();
                }
                ReplCommand::Observer {} => {
                    self.use_observer()
                        .await
                        .map_err(|e| println!("{}", e))
                        .ok();
                }
                ReplCommand::ShowNamespaces => {
                    self.list_namespaces()
                        .await
                        .map_err(|e| println!("{}", e))
                        .ok();
                }
                ReplCommand::UseDatabase { db_name } => {
                    self.use_database(db_name);
                }
                ReplCommand::SqlCommand { sql } => {
                    self.run_sql(sql).await.map_err(|e| println!("{}", e)).ok();
                }
                ReplCommand::Exit => {
                    info!("exiting at user request");
                    return Ok(());
                }
                ReplCommand::SetFormat { format } => {
                    self.set_output_format(format)?;
                }
            }
        }
    }
pub async fn run ( & mut self ) -> Result < ( ) > { println ! ( " " ) ; loop { match self . next_command ( ) ? { ReplCommand :: Help => { self . print_help ( ) ; } ReplCommand :: Observer { } => { self . use_observer ( ) . await . map_err ( | e | println ! ( " " e ) ) . ok ( ) ; } ReplCommand :: ShowNamespaces => { self . list_namespaces ( ) . await . map_err ( | e | println ! ( " " e ) ) . ok ( ) ; } ReplCommand :: UseDatabase { db_name } => { self . use_database ( db_name ) ; } ReplCommand :: SqlCommand { sql } => { self . run_sql ( sql ) . await . map_err ( | e | println ! ( " " e ) ) . ok ( ) ; } ReplCommand :: Exit => { info ! ( " " ) ; return Ok ( ( ) ) ; } ReplCommand :: SetFormat { format } => { self . set_output_format ( format ) ? ; } } } }
Read Evaluate Print Loop (interactive command line) for SQL
Inspired / based on repl.rs from DataFusion
Read Evaluate Print Loop ( interactive command line ) for SQL Inspired / based on repl . rs from DataFusion
&mut self
&mut self