Changeset 19191 for trunk/FACT++/src/fits2sql.cc
- Timestamp:
- 08/28/18 20:21:02 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fits2sql.cc
r19186 r19191 198 198 "with the --index option.\n" 199 199 "\n" 200 "To create the index as a UNIQUE INDEX, you can use the --unique option which " 201 "implies --index.\n" 202 "\n" 200 203 "If a query failed, the query is printed to stderr together with the error message. " 201 204 "For the main INSERT query, this is only true if the verbosity level is at least 2 " … … 325 328 const bool run_delete = conf.Get<bool>("delete"); 326 329 const bool index = conf.Get<bool>("index"); 330 const bool unique = conf.Get<bool>("unique"); 327 331 328 332 const string engine = conf.Get<string>("engine"); … … 592 596 query += ",\n PRIMARY KEY USING BTREE (`"+boost::algorithm::join(primary, "`, `")+"`)"; 593 597 594 if (!vindex.empty() && index)595 query += ",\n INDEX USING BTREE (`"+boost::algorithm::join(vindex, "`, `")+"`)";598 if (!vindex.empty() && (index || unique)) 599 query += ",\n "+string(unique?"UNIQUE ":"")+"INDEX USING BTREE (`"+boost::algorithm::join(vindex, "`, `")+"`)"; 596 600 597 601 query +=
Note:
See TracChangeset
for help on using the changeset viewer.