lintel 0.2.0
Loading...
Searching...
No Matches
DatabaseConnectionComponent.h
Go to the documentation of this file.
1#ifndef LINTEL_DATABASECONNECTIONCOMPONENT_H
2#define LINTEL_DATABASECONNECTIONCOMPONENT_H
3
5
7
8namespace tinyxml2 {
9class XMLElement;
10}
11
12namespace lintel {
15{
16private:
18 std::shared_ptr<EnvironmentConfiguration> m_environmentConfiguration;
20 static const struct Shapes
21 {
22 const char *const CONFIG_ROOT = "DatabaseConnections";
23 const char *const DATABASE_ROOT = "DatabaseConnection";
24 const char *const CONNECTION_NAME = "name";
25 const char *const CONNECTION_TYPE = "type";
26 const char *const CONNECTION_USER_NAME = "user_name";
27 const char *const CONNECTION_PASSWORD = "password";
28 const char *const CONNECTION_CONNECTION = "connection";
29 const char *const CONNECTION_DATBASE_NAME = "database_name";
30 const char *const CONNECTION_PORT = "port";
31 const char *const CONNECTION_DEFAULT = "default";
32 const char *const CONNECTION_POOL_SIZE = "poolSize";
33 const char *const CONNECTION_POOL_ACQUIRE_TIMEOUT_MS = "poolAcquireTimeoutMs";
34 const char *const CONNECTION_ALLOW_MULTIPLE_SQLITE_CONNECTIONS = "allowMultipleSqliteConnections";
35 } shape;
36
44 static std::shared_ptr<Entry> parseDatabaseEntry(tinyxml2::XMLElement *propertyElement,
46 const std::string &configRoot,
47 const std::shared_ptr<EnvironmentConfiguration> &envConfig,
49
50public:
53 DatabaseConnectionComponent(std::shared_ptr<EnvironmentConfiguration> environmentConfiguration);
54
60 std::vector<std::shared_ptr<Entry>>
61 parse(const std::string &content, int32_t lineOffset, const std::string &fileName) override;
62};
63
64}// namespace lintel
65#endif// LINTEL_DATABASECONNECTIONCOMPONENT_H
Definition Component.h:13
Definition DatabaseConnectionComponent.h:15
DatabaseConnectionComponent(std::shared_ptr< EnvironmentConfiguration > environmentConfiguration)
std::vector< std::shared_ptr< Entry > > parse(const std::string &content, int32_t lineOffset, const std::string &fileName) override
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9
Definition DatabaseConnectionComponent.h:8