blob: 7f8c4df7a3fd1613d8c2aba17dfd8cd7a91f9384 [file] [log] [blame]
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
**/
#ifndef QUICKSTEP_CLI_COMMAND_COMMAND_EXECUTOR_UTIL_HPP_
#define QUICKSTEP_CLI_COMMAND_COMMAND_EXECUTOR_UTIL_HPP_
#include <string>
#include "utility/PtrVector.hpp"
namespace quickstep {
class CatalogDatabase;
class ParseString;
namespace cli {
/** \addtogroup CLI
* @{
*/
/**
* @brief Executes the command by calling the command handler.
*
* @param statement The parsed statement from the cli.
* @param catalog_database The catalog information about the current database.
* @param main_thread_client_id The TMB client ID of the main thread.
* @param foreman_client_id The TMB client ID of the Foreman thread.
* @param bus A pointer to the TMB.
* @param query_processor The query processor to generate plans for SQL queries.
* @param foreman The foreman to execute query plans.
* @param out The stream where the output of the command has to be redirected to.
*/
extern std::string ExecuteDescribeDatabase(
const PtrVector<ParseString> &arguments,
const CatalogDatabase &catalog_database);
extern std::string ExecuteDescribeTable(
const PtrVector<ParseString> &arguments,
const CatalogDatabase &catalog_database);
/** @} */
} // namespace cli
} // namespace quickstep
#endif // QUICKSTEP_CLI_COMMAND_COMMAND_EXECUTOR_UTIL_HPP_