mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 18:32:29 +00:00
50 lines
1.2 KiB
C++
50 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "config.h"
|
|
|
|
#include <memory>
|
|
#include <optional>
|
|
|
|
#include <Client/Connection.h>
|
|
#include <Interpreters/Cluster.h>
|
|
#include <Storages/IStorageCluster.h>
|
|
#include <Storages/StorageURL.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class Context;
|
|
|
|
class StorageURLCluster : public IStorageCluster
|
|
{
|
|
public:
|
|
StorageURLCluster(
|
|
ContextPtr context_,
|
|
const String & cluster_name_,
|
|
const String & uri_,
|
|
const String & format_,
|
|
const String & compression_method_,
|
|
const StorageID & table_id_,
|
|
const ColumnsDescription & columns_,
|
|
const ConstraintsDescription & constraints_,
|
|
const StorageURL::Configuration & configuration_,
|
|
bool structure_argument_was_provided_);
|
|
|
|
std::string getName() const override { return "URLCluster"; }
|
|
|
|
NamesAndTypesList getVirtuals() const override;
|
|
|
|
RemoteQueryExecutor::Extension getTaskIteratorExtension(ASTPtr query, const ContextPtr & context) const override;
|
|
|
|
private:
|
|
void addColumnsStructureToQuery(ASTPtr & query, const String & structure, const ContextPtr & context) override;
|
|
|
|
String uri;
|
|
String format_name;
|
|
String compression_method;
|
|
};
|
|
|
|
|
|
}
|
|
|