Changeset 19136 for trunk/FACT++/src/fits2sql.cc
- Timestamp:
- 08/03/18 20:53:39 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fits2sql.cc
r19135 r19136 464 464 Database connection(uri); 465 465 466 if (verbose>0) 467 { 468 cout << "Client Version: " << connection.client_version() << '\n'; 469 cout << "Server Version: " << connection.server_version() << endl; 470 } 471 466 472 if (print_connection) 467 473 { … … 692 698 } 693 699 700 if (print_connection) 701 { 702 try 703 { 704 const auto &res1 = connection.query("SHOW STATUS LIKE 'Bytes_%'").store(); 705 cout << left << setw(16) << res1[0]["Variable_name"] << ' ' << Tools::Scientific(res1[0]["Value"]) << endl; 706 cout << left << setw(16) << res1[1]["Variable_name"] << ' ' << Tools::Scientific(res1[1]["Value"]) << endl; 707 cout << endl; 708 } 709 catch (const exception &e) 710 { 711 cerr << "\nSHOW STATUS LIKE 'Bytes_%'\n\n"; 712 cerr << "SQL query failed:\n" << e.what() << endl; 713 return 6; 714 } 715 } 716 694 717 return 0; 695 718 }
Note:
See TracChangeset
for help on using the changeset viewer.