2016-01-28 01:00:27 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <DB/Interpreters/Cluster.h>
|
|
|
|
#include <DB/Parsers/IAST.h>
|
|
|
|
#include <DB/Storages/IStorage.h>
|
|
|
|
#include <DB/Client/ConnectionPool.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2016-03-07 04:35:06 +00:00
|
|
|
struct Settings;
|
2016-01-28 01:00:27 +00:00
|
|
|
class Context;
|
|
|
|
class Cluster;
|
|
|
|
class Throttler;
|
|
|
|
|
|
|
|
namespace ClusterProxy
|
|
|
|
{
|
|
|
|
|
|
|
|
class IQueryConstructor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ~IQueryConstructor() {}
|
2016-03-01 17:47:53 +00:00
|
|
|
|
2016-01-28 01:00:27 +00:00
|
|
|
virtual BlockInputStreamPtr createLocal(ASTPtr query_ast, const Context & context, const Cluster::Address & address) = 0;
|
|
|
|
virtual BlockInputStreamPtr createRemote(IConnectionPool * pool, const std::string & query,
|
|
|
|
const Settings & settings, ThrottlerPtr throttler, const Context & context) = 0;
|
|
|
|
virtual BlockInputStreamPtr createRemote(ConnectionPoolsPtr & pools, const std::string & query,
|
|
|
|
const Settings & new_settings, ThrottlerPtr throttler, const Context & context) = 0;
|
2016-03-10 15:53:20 +00:00
|
|
|
virtual bool localAndRemote() const = 0;
|
2016-01-28 01:00:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|