Changeset 19112 for trunk/FACT++/src
- Timestamp:
- 07/31/18 20:51:34 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/calcsource.cc
r19107 r19112 30 30 ("table.source", var<string>("Source"), "Name of the table where the sources are stored") 31 31 ("table.position", var<string>("Position"), "Name of the table where the calculated posiiton will be stored") 32 ("engine", var<string>(""), "Database engine to be used when a new table is created") 33 ("row-format", var<string>(""), "Defines the ROW_FORMAT keyword for table creation") 32 34 ("ignore-errors", po_switch(), "Adds the IGNORE keyword to the INSERT query (turns errors into warnings, ignores rows with errors)") 33 35 ("force", po_switch(), "Force processing even if there is no database connection") … … 160 162 const string tab_position = conf.Get<string>("table.position"); 161 163 164 const string engine = conf.Get<string>("engine"); 165 const string row_format = conf.Get<string>("row-format"); 162 166 const bool ignore_errors = conf.Get<bool>("ignore-errors"); 163 167 … … 530 534 cout << "Creating table `" << tab_position << "`" << endl; 531 535 532 conststring query2 =536 string query2 = 533 537 "CREATE TABLE IF NOT EXISTS `"+tab_position+"`\n" 534 538 "(\n" … … 539 543 " PRIMARY KEY (FileId, EvtNumber)\n" 540 544 ")\n" 541 "DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci\n" 542 "ENGINE=MyISAM\n" 543 "COMMENT='created by "+conf.GetName()+"'\n"; 545 "DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci\n"; 546 if (!engine.empty()) 547 query2 += "ENGINE="+engine+"\n"; 548 if (!row_format.empty()) 549 query2 += "ROW_FORMAT="+row_format+"\n"; 550 query2 += "COMMENT='created by "+conf.GetName()+"'\n"; 544 551 545 552 try … … 1019 1026 1020 1027 */ 1021
Note:
See TracChangeset
for help on using the changeset viewer.