2021-03-05 09:38:00 +00:00
|
|
|
#include "LibraryBridge.h"
|
|
|
|
|
2024-07-11 22:00:47 +00:00
|
|
|
#include <iostream>
|
|
|
|
|
2021-03-05 09:38:00 +00:00
|
|
|
int mainEntryClickHouseLibraryBridge(int argc, char ** argv)
|
|
|
|
{
|
|
|
|
DB::LibraryBridge app;
|
|
|
|
try
|
|
|
|
{
|
|
|
|
return app.run(argc, argv);
|
|
|
|
}
|
|
|
|
catch (...)
|
|
|
|
{
|
|
|
|
std::cerr << DB::getCurrentExceptionMessage(true) << "\n";
|
|
|
|
auto code = DB::getCurrentExceptionCode();
|
|
|
|
return code ? code : 1;
|
|
|
|
}
|
|
|
|
}
|
2022-08-03 11:19:13 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
std::string LibraryBridge::bridgeName() const
|
|
|
|
{
|
|
|
|
return "LibraryBridge";
|
|
|
|
}
|
|
|
|
|
|
|
|
LibraryBridge::HandlerFactoryPtr LibraryBridge::getHandlerFactoryPtr(ContextPtr context) const
|
|
|
|
{
|
2024-03-22 20:07:12 +00:00
|
|
|
return std::make_shared<LibraryBridgeHandlerFactory>("LibraryRequestHandlerFactory", context);
|
2022-08-03 11:19:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|