| 517 | } |
| 518 | |
| 519 | void libToDatabase() |
| 520 | { |
| 521 | auto libPath = readPathFromInput(); |
| 522 | if (Search::Threads.dbStorage()) { |
| 523 | MESSAGEL("Importing from lib file " << pathToConsoleString(libPath) |
| 524 | << ", this might take a while..."); |
| 525 | auto startTime = now(); |
| 526 | std::ifstream libStream(libPath, std::ios::binary); |
| 527 | size_t writeCount = ::Database::importLibToDatabase(*Search::Threads.dbStorage(), |
| 528 | libStream, |
| 529 | options.rule, |
| 530 | board ? board->size() : 15); |
| 531 | auto endTime = now(); |
| 532 | MESSAGEL("Imported " << writeCount << " records from lib file using " |
| 533 | << (endTime - startTime) << " ms."); |
| 534 | } |
| 535 | } |
| 536 | |
| 537 | void restart() |
| 538 | { |
no test coverage detected