- Timestamp:
- 07/31/18 14:09:16 (6 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fits2sql.cc
r19103 r19104 591 591 { 592 592 if (!noinsert && !dry_run) 593 // => Simple result 594 connection.query(query).execute(); 593 { 594 auto q = connection.query(query); 595 q.execute(); 596 cout << q.info() << '\n' << endl; 597 } 595 598 else 596 599 cout << "Insert query skipped!" << endl; … … 609 612 if (verbose>0) 610 613 { 611 cout << count << " row(s) inserted.\n\n";612 614 cout << "Total execution time: " << Time().UnixTime()-start.UnixTime() << "s\n" << endl; 613 615 … … 616 618 const auto resw = 617 619 connection.query("SHOW WARNINGS").store(); 618 619 if (resw.num_rows()>0)620 cout << "\nWARNINGS:\n\n";621 620 622 621 for (size_t i=0; i<resw.num_rows(); i++) … … 633 632 { 634 633 cerr << "\nSHOW WARNINGS\n\n"; 635 cerr << "SQL query failed:\n" << e.what() << endl;634 cerr << "SQL query failed:\n" << e.what() << '\n' <<endl; 636 635 return 8; 637 636 } -
trunk/FACT++/src/root2sql.cc
r19103 r19104 600 600 { 601 601 if (!noinsert && !dry_run) 602 // => Simple result 603 connection.query(query).execute(); 602 { 603 auto q = connection.query(query); 604 q.execute(); 605 cout << q.info() << '\n' << endl; 606 } 604 607 else 605 608 cout << "Insert query skipped!" << endl; … … 618 621 if (verbose>0) 619 622 { 620 cout << count << " row(s) inserted.\n\n";621 623 cout << "Total execution time: " << Time().UnixTime()-start.UnixTime() << "s\n" << endl; 622 624 … … 625 627 const auto resw = 626 628 connection.query("SHOW WARNINGS").store(); 627 628 if (resw.num_rows()>0)629 cout << "\nWARNINGS:\n\n";630 629 631 630 for (size_t i=0; i<resw.num_rows(); i++) … … 642 641 { 643 642 cerr << "\nSHOW WARNINGS\n\n"; 644 cerr << "SQL query failed:\n" << e.what() << endl;643 cerr << "SQL query failed:\n" << e.what() << '\n' <<endl; 645 644 return 7; 646 645 }
Note:
See TracChangeset
for help on using the changeset viewer.