comparison OrthancServer/Plugins/Engine/OrthancPluginDatabaseV3.cpp @ 4602:cfdd1f59ff6f db-changes

fix OrthancCDatabasePlugin.h
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 22 Mar 2021 19:25:27 +0100
parents 27c07dbf6b4f
children 2c702cfae274
comparison
equal deleted inserted replaced
4601:27c07dbf6b4f 4602:cfdd1f59ff6f
723 723
724 virtual bool LookupResource(int64_t& id, 724 virtual bool LookupResource(int64_t& id,
725 ResourceType& type, 725 ResourceType& type,
726 const std::string& publicId) ORTHANC_OVERRIDE 726 const std::string& publicId) ORTHANC_OVERRIDE
727 { 727 {
728 CheckSuccess(that_.backend_.lookupResource(transaction_, Plugins::Convert(type), publicId.c_str())); 728 uint8_t existing;
729 CheckNoEvent(); 729 OrthancPluginResourceType t;
730 return ReadSingleInt64Answer(id); 730 CheckSuccess(that_.backend_.lookupResource(transaction_, &existing, &id, &t, publicId.c_str()));
731 CheckNoEvent();
732
733 if (existing == 0)
734 {
735 return false;
736 }
737 else
738 {
739 type = Plugins::Convert(t);
740 return true;
741 }
731 } 742 }
732 743
733 744
734 virtual bool SelectPatientToRecycle(int64_t& internalId) ORTHANC_OVERRIDE 745 virtual bool SelectPatientToRecycle(int64_t& internalId) ORTHANC_OVERRIDE
735 { 746 {