Changeset 20055
- Timestamp:
- 04/12/21 09:15:23 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Database.h
r19435 r20055 21 21 char compression; 22 22 23 DatabaseName(const std::string &database ) : compression(0)23 DatabaseName(const std::string &database, const bool &print=false) : compression(0) 24 24 { 25 25 if (database.empty()) … … 50 50 port = 0; 51 51 } 52 53 if (print) 54 std::cerr << "URI=" << user << ":" << passwd << "@" << server << ":" << port << "/" << db << "?compress=" << uint16_t(compression) << std::endl; 52 55 } 53 56 … … 69 72 { 70 73 public: 71 Database(const std::string &desc ) : DatabaseName(desc),74 Database(const std::string &desc, const bool &print=false) : DatabaseName(desc, print), 72 75 mysqlpp::Connection() 73 76 { … … 76 79 set_option(new mysqlpp::CompressOption()); 77 80 81 //set_option(new mysqlpp::WriteTimeoutOption(3)); 82 //set_option(new mysqlpp::ReadTimeoutOption(28800)); 78 83 set_option(new mysqlpp::ReconnectOption(true)); 79 84
Note:
See TracChangeset
for help on using the changeset viewer.