| 1 | #include <Storages/StorageURL.h> |
| 2 | #include <Storages/ColumnsDescription.h> |
| 3 | #include <TableFunctions/TableFunctionFactory.h> |
| 4 | #include <TableFunctions/TableFunctionURL.h> |
| 5 | #include <Poco/URI.h> |
| 6 | #include "registerTableFunctions.h" |
| 7 | |
| 8 | |
| 9 | namespace DB |
| 10 | { |
| 11 | StoragePtr TableFunctionURL::getStorage( |
| 12 | const String & source, const String & format, const ColumnsDescription & columns, Context & global_context, const std::string & table_name, const String & compression_method) const |
| 13 | { |
| 14 | Poco::URI uri(source); |
| 15 | return StorageURL::create(uri, getDatabaseName(), table_name, format, columns, ConstraintsDescription{}, global_context, compression_method); |
| 16 | } |
| 17 | |
| 18 | void registerTableFunctionURL(TableFunctionFactory & factory) |
| 19 | { |
| 20 | factory.registerFunction<TableFunctionURL>(); |
| 21 | } |
| 22 | } |
| 23 | |