Changeset 14046 for trunk/FACT++
- Timestamp:
- 06/02/12 21:28:50 (12 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Configuration.cc
r14045 r14046 392 392 Database db(database); 393 393 394 cout << "Connected to '" << db. database() << "' for " << prgname << endl;394 cout << "Connected to '" << db.uri() << "' for " << prgname << endl; 395 395 396 396 const mysqlpp::StoreQueryResult res = -
trunk/FACT++/src/Database.h
r14044 r14046 31 31 db = what[9]; 32 32 port = stoi(std::string(what[7])); 33 } 33 34 34 /*35 cout << "Connecting to '";36 if (!user.empty())37 cout << user << "@";38 cout << server;39 if (port)40 cout << ":" << port;41 if (!db.empty())42 cout << "/" << db;43 cout << "' for " << prgname << endl;44 */35 std::string uri() const 36 { 37 std::string rc; 38 if (!user.empty()) 39 rc += user+"@"; 40 rc += server; 41 if (port) 42 rc += ":"+std::to_string(port); 43 if (!db.empty()) 44 rc += "/"+db; 45 return rc; 45 46 } 46 47 }; … … 49 50 { 50 51 public: 51 Database(const std::string &d atabase) : DatabaseName(database),52 Database(const std::string &desc) : DatabaseName(desc), 52 53 mysqlpp::Connection(db.c_str(), server.c_str(), user.c_str(), passwd.c_str(), port) 53 54 { -
trunk/FACT++/src/drivectrl.cc
r14045 r14046 1228 1228 Database db(fDatabase); 1229 1229 1230 T::Message("Connected to '"+db. database()+"'");1230 T::Message("Connected to '"+db.uri()+"'"); 1231 1231 1232 1232 const mysqlpp::StoreQueryResult res =
Note:
See TracChangeset
for help on using the changeset viewer.