#include "MySQLConnection.h"
◆ MySQLConnectionInfo()
MySQLConnectionInfo::MySQLConnectionInfo |
( |
std::string_view |
infoString | ) |
|
|
explicit |
35{
36 std::vector<std::string_view> tokens =
Acore::Tokenize(infoString,
';',
true);
37
38 if (tokens.size() != 5 && tokens.size() != 6)
39 return;
40
41 host.assign(tokens.at(0));
43 user.assign(tokens.at(2));
46
47 if (tokens.size() == 6)
48 ssl.assign(tokens.at(5));
49}
std::vector< std::string_view > Tokenize(std::string_view str, char sep, bool keepEmpty)
Definition: Tokenize.cpp:20
std::string host
Definition: MySQLConnection.h:50
std::string port_or_socket
Definition: MySQLConnection.h:51
std::string user
Definition: MySQLConnection.h:47
std::string database
Definition: MySQLConnection.h:49
std::string ssl
Definition: MySQLConnection.h:52
std::string password
Definition: MySQLConnection.h:48
References database, host, password, port_or_socket, ssl, Acore::Tokenize(), and user.
◆ database
std::string MySQLConnectionInfo::database |
◆ host
std::string MySQLConnectionInfo::host |
◆ password
std::string MySQLConnectionInfo::password |
◆ port_or_socket
std::string MySQLConnectionInfo::port_or_socket |
◆ ssl
std::string MySQLConnectionInfo::ssl |
◆ user
std::string MySQLConnectionInfo::user |