summaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/TableFunctions/TableFunctionMongoDB.h
diff options
context:
space:
mode:
authorvitalyisaev <[email protected]>2023-11-14 09:58:56 +0300
committervitalyisaev <[email protected]>2023-11-14 10:20:20 +0300
commitc2b2dfd9827a400a8495e172a56343462e3ceb82 (patch)
treecd4e4f597d01bede4c82dffeb2d780d0a9046bd0 /contrib/clickhouse/src/TableFunctions/TableFunctionMongoDB.h
parentd4ae8f119e67808cb0cf776ba6e0cf95296f2df7 (diff)
YQ Connector: move tests from yql to ydb (OSS)
Перенос папки с тестами на Коннектор из папки yql в папку ydb (синхронизируется с github).
Diffstat (limited to 'contrib/clickhouse/src/TableFunctions/TableFunctionMongoDB.h')
-rw-r--r--contrib/clickhouse/src/TableFunctions/TableFunctionMongoDB.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/clickhouse/src/TableFunctions/TableFunctionMongoDB.h b/contrib/clickhouse/src/TableFunctions/TableFunctionMongoDB.h
new file mode 100644
index 00000000000..c2c15cabe5a
--- /dev/null
+++ b/contrib/clickhouse/src/TableFunctions/TableFunctionMongoDB.h
@@ -0,0 +1,31 @@
+#pragma once
+
+#include <Storages/StorageMongoDB.h>
+#include <TableFunctions/ITableFunction.h>
+#include <Storages/ExternalDataSourceConfiguration.h>
+
+namespace DB
+{
+
+class TableFunctionMongoDB : public ITableFunction
+{
+public:
+ static constexpr auto name = "mongodb";
+
+ std::string getName() const override { return name; }
+
+private:
+ StoragePtr executeImpl(
+ const ASTPtr & ast_function, ContextPtr context,
+ const std::string & table_name, ColumnsDescription cached_columns, bool is_insert_query) const override;
+
+ const char * getStorageTypeName() const override { return "MongoDB"; }
+
+ ColumnsDescription getActualTableStructure(ContextPtr context, bool is_insert_query) const override;
+ void parseArguments(const ASTPtr & ast_function, ContextPtr context) override;
+
+ std::optional<StorageMongoDB::Configuration> configuration;
+ String structure;
+};
+
+}