2018-06-11 12:13:00 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <TableFunctions/ITableFunctionFileLike.h>
|
|
|
|
#include <Interpreters/Context.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
/* url(source, format, structure) - creates a temporary storage from url
|
|
|
|
*/
|
|
|
|
class TableFunctionURL : public ITableFunctionFileLike
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static constexpr auto name = "url";
|
|
|
|
std::string getName() const override
|
|
|
|
{
|
|
|
|
return name;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
StoragePtr getStorage(
|
2019-11-19 12:46:07 +00:00
|
|
|
const String & source, const String & format, const ColumnsDescription & columns, Context & global_context, const std::string & table_name, const String & compression_method) const override;
|
2020-01-24 16:20:36 +00:00
|
|
|
AccessType getRequiredAccessType() const override;
|
2018-06-11 12:13:00 +00:00
|
|
|
};
|
|
|
|
}
|