Joedb 10.2.1
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Local_Connection_Builder.h
Go to the documentation of this file.
1#ifndef joedb_Local_Connection_Builder_declared
2#define joedb_Local_Connection_Builder_declared
3
6
7namespace joedb
8{
9 /// @ingroup ui
11 {
12 public:
13 const char *get_name() const override {return "local";}
14
15 std::string get_connection_parameters() const override
16 {
17 return "<path>";
18 }
19
20 void build_connector(Arguments &arguments) override
21 {
22 const std::string_view endpoint_path = arguments.get_next();
23
24 if (arguments.missing())
25 return;
26
27 connector = std::make_unique<Local_Connector>(endpoint_path.data());
28 }
29 };
30}
31
32#endif
Class for conveniently parsing command-line arguments.
Definition Arguments.h:19
bool missing() const
Definition Arguments.h:146
std::string_view get_next()
const char * get_name() const override
void build_connector(Arguments &arguments) override
std::string get_connection_parameters() const override
std::unique_ptr< Connector > connector