Mercurial > hg > orthanc
comparison OrthancServer/ServerIndex.cpp @ 3025:039a9d262d64 db-changes
preparing to speed up find in databases
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 17 Dec 2018 17:05:28 +0100 |
parents | d207f6ac1f86 |
children | fd587cf51a89 |
comparison
equal
deleted
inserted
replaced
3024:ef17a587e10d | 3025:039a9d262d64 |
---|---|
2450 catch (OrthancException& e) | 2450 catch (OrthancException& e) |
2451 { | 2451 { |
2452 LOG(ERROR) << "EXCEPTION [" << e.What() << "]"; | 2452 LOG(ERROR) << "EXCEPTION [" << e.What() << "]"; |
2453 } | 2453 } |
2454 } | 2454 } |
2455 | |
2456 | |
2457 void ServerIndex::ApplyLookupPatients(std::vector<std::string>& patientsId, | |
2458 std::vector<std::string>& instancesId, | |
2459 const DatabaseLookup& lookup, | |
2460 size_t limit) | |
2461 { | |
2462 boost::mutex::scoped_lock lock(mutex_); | |
2463 | |
2464 db_.ApplyLookupPatients(patientsId, lookup, limit); | |
2465 db_.FindOneChildInstance(instancesId, patientsId, ResourceType_Patient); | |
2466 } | |
2467 | |
2468 | |
2469 void ServerIndex::ApplyLookupResources(std::vector<std::string>& resourcesId, | |
2470 std::vector<std::string>& instancesId, | |
2471 const DatabaseLookup& lookup, | |
2472 ResourceType queryLevel, | |
2473 size_t limit) | |
2474 { | |
2475 boost::mutex::scoped_lock lock(mutex_); | |
2476 | |
2477 db_.ApplyLookupResources(resourcesId, lookup, queryLevel, limit); | |
2478 db_.FindOneChildInstance(instancesId, resourcesId, queryLevel); | |
2479 } | |
2455 } | 2480 } |