2018-04-02 11:43:37 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <TableFunctions/ITableFunction.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2018-04-06 11:21:41 +00:00
|
|
|
/* file(path, format, structure, useStorageMemory) - creates a temporary storage from file
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* The file must be in the current database data directory.
|
|
|
|
* The relative path begins with the current database data directory.
|
2018-04-02 11:43:37 +00:00
|
|
|
*/
|
|
|
|
class TableFunctionFile : public ITableFunction
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static constexpr auto name = "file";
|
|
|
|
std::string getName() const override { return name; }
|
|
|
|
private:
|
|
|
|
StoragePtr executeImpl(const ASTPtr & ast_function, const Context & context) const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|