/// Run the appropriate subcommand based on the input from the user.
Run the appropriate subcommand based on the input from the user.
Run the appropriate subcommand based on the input from the user .
pub fn run_command(matches: ArgMatches) -> Result<(), PQRSError> {
    // match based on the subcommand name, create an instance and execute the command
    match matches.subcommand() {
        ("cat", Some(m)) => CatCommand::new(m).execute(),
        ("head", Some(m)) => HeadCommand::new(m).execute(),
        ("schema", Some(m)) => SchemaCommand::new(m).execute(),
        ("rowcount", Some(m)) => RowCountCommand::new(m).execute(),
        ("size", Some(m)) => SizeCommand::new(m).execute(),
        ("sample", Some(m)) => SampleCommand::new(m).execute(),
        ("merge", Some(m)) => MergeCommand::new(m).execute(),
        _ => Ok(()),
    }
}
pub fn run_command ( matches : ArgMatches ) -> Result < ( ) , PQRSError > { // match based on the subcommand name, create an instance and execute the command match matches . subcommand ( ) { ( " " , Some ( m ) ) => CatCommand :: new ( m ) . execute ( ) , ( " " , Some ( m ) ) => HeadCommand :: new ( m ) . execute ( ) , ( " " , Some ( m ) ) => SchemaCommand :: new ( m ) . execute ( ) , ( " " , Some ( m ) ) => RowCountCommand :: new ( m ) . execute ( ) , ( " " , Some ( m ) ) => SizeCommand :: new ( m ) . execute ( ) , ( " " , Some ( m ) ) => SampleCommand :: new ( m ) . execute ( ) , ( " " , Some ( m ) ) => MergeCommand :: new ( m ) . execute ( ) , _ => Ok ( ( ) ) , } }
Run the appropriate subcommand based on the input from the user.
Run the appropriate subcommand based on the input from the user .
matches
ArgMatches