mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 19:12:03 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
29 lines
900 B
C++
29 lines
900 B
C++
#include <Storages/StorageURL.h>
|
|
#include <Storages/ColumnsDescription.h>
|
|
#include <Access/AccessFlags.h>
|
|
#include <TableFunctions/TableFunctionFactory.h>
|
|
#include <TableFunctions/TableFunctionURL.h>
|
|
#include <Poco/URI.h>
|
|
#include "registerTableFunctions.h"
|
|
|
|
|
|
namespace DB
|
|
{
|
|
StoragePtr TableFunctionURL::getStorage(
|
|
const String & source, const String & format, const ColumnsDescription & columns, Context & global_context, const std::string & table_name, const String & compression_method) const
|
|
{
|
|
Poco::URI uri(source);
|
|
return StorageURL::create(uri, StorageID(getDatabaseName(), table_name), format, columns, ConstraintsDescription{}, global_context, compression_method);
|
|
}
|
|
|
|
AccessType TableFunctionURL::getRequiredAccessType() const
|
|
{
|
|
return AccessType::url;
|
|
}
|
|
|
|
void registerTableFunctionURL(TableFunctionFactory & factory)
|
|
{
|
|
factory.registerFunction<TableFunctionURL>();
|
|
}
|
|
}
|