# HG changeset patch # User Sebastien Jodogne # Date 1546775298 -3600 # Node ID 2ee166f77501b1ff9c2320ee8ced8cf7f0fce337 # Parent a2134531473c8db1f6f2355ac3a69487b2e8d357 renamed macro diff -r a2134531473c -r 2ee166f77501 Framework/Plugins/IndexBackend.cpp --- a/Framework/Plugins/IndexBackend.cpp Sun Jan 06 12:35:29 2019 +0100 +++ b/Framework/Plugins/IndexBackend.cpp Sun Jan 06 12:48:18 2019 +0100 @@ -1582,7 +1582,7 @@ } -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 class IndexBackend::LookupFormatter : public Orthanc::ISqlLookupFormatter { private: @@ -1651,7 +1651,7 @@ #endif -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 // New primitive since Orthanc 1.5.2 void IndexBackend::LookupResources(const std::vector& lookup, OrthancPluginResourceType queryLevel, @@ -1721,7 +1721,7 @@ #endif -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 static void ExecuteSetResourcesContentTags( DatabaseManager& manager, const std::string& table, @@ -1769,7 +1769,7 @@ #endif -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 static void ExecuteSetResourcesContentMetadata( DatabaseManager& manager, uint32_t count, @@ -1834,7 +1834,7 @@ #endif -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 // New primitive since Orthanc 1.5.2 void IndexBackend::SetResourcesContent( uint32_t countIdentifierTags, @@ -1862,7 +1862,7 @@ #endif -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 // New primitive since Orthanc 1.5.2 void IndexBackend::GetChildrenMetadata(std::list& target, int64_t resourceId, diff -r a2134531473c -r 2ee166f77501 Framework/Plugins/IndexBackend.h --- a/Framework/Plugins/IndexBackend.h Sun Jan 06 12:35:29 2019 +0100 +++ b/Framework/Plugins/IndexBackend.h Sun Jan 06 12:48:18 2019 +0100 @@ -258,7 +258,7 @@ virtual void GetChildren(std::list& childrenPublicIds, int64_t id); -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 // New primitive since Orthanc 1.5.2 virtual void LookupResources(const std::vector& lookup, OrthancPluginResourceType queryLevel, @@ -266,7 +266,7 @@ bool requestSomeInstance); #endif -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 // New primitive since Orthanc 1.5.2 virtual void SetResourcesContent( uint32_t countIdentifierTags, @@ -277,7 +277,7 @@ const OrthancPluginResourcesContentMetadata* metadata); #endif -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 // New primitive since Orthanc 1.5.2 virtual void GetChildrenMetadata(std::list& target, int64_t resourceId, diff -r a2134531473c -r 2ee166f77501 Framework/Plugins/OrthancCppDatabasePlugin.h --- a/Framework/Plugins/OrthancCppDatabasePlugin.h Sun Jan 06 12:35:29 2019 +0100 +++ b/Framework/Plugins/OrthancCppDatabasePlugin.h Sun Jan 06 12:48:18 2019 +0100 @@ -252,7 +252,7 @@ } -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 void AnswerMatchingResource(const std::string& resourceId) { if (allowedAnswers_ != AllowedAnswers_All && @@ -270,7 +270,7 @@ #endif -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 void AnswerMatchingResource(const std::string& resourceId, const std::string& someInstanceId) { @@ -494,14 +494,14 @@ virtual bool HasCreateInstance() const = 0; -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 virtual void LookupResources(const std::vector& lookup, OrthancPluginResourceType queryLevel, uint32_t limit, bool requestSomeInstance) = 0; #endif -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 virtual void CreateInstance(OrthancPluginCreateInstanceResult& result, const char* hashPatient, const char* hashStudy, @@ -513,7 +513,7 @@ #endif -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 virtual void SetResourcesContent( uint32_t countIdentifierTags, const OrthancPluginResourcesContentTags* identifierTags, @@ -524,7 +524,7 @@ #endif -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 virtual void GetChildrenMetadata(std::list& target, int64_t resourceId, int32_t metadata) = 0; @@ -1507,7 +1507,7 @@ } -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 /* Use GetOutput().AnswerResource() */ static OrthancPluginErrorCode LookupResources( OrthancPluginDatabaseContext* context, @@ -1539,7 +1539,7 @@ #endif -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 static OrthancPluginErrorCode CreateInstance(OrthancPluginCreateInstanceResult* output, void* payload, const char* hashPatient, @@ -1560,7 +1560,7 @@ #endif -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 static OrthancPluginErrorCode SetResourcesContent( void* payload, uint32_t countIdentifierTags, @@ -1586,7 +1586,7 @@ -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 // New primitive since Orthanc 1.5.2 static OrthancPluginErrorCode GetChildrenMetadata(OrthancPluginDatabaseContext* context, void* payload, @@ -1695,7 +1695,7 @@ # endif #endif -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 // Optimizations brought by Orthanc 1.5.2 extensions.lookupResources = LookupResources; // Fast lookup extensions.setResourcesContent = SetResourcesContent; // Fast setting tags/metadata diff -r a2134531473c -r 2ee166f77501 PostgreSQL/Plugins/PostgreSQLIndex.cpp --- a/PostgreSQL/Plugins/PostgreSQLIndex.cpp Sun Jan 06 12:35:29 2019 +0100 +++ b/PostgreSQL/Plugins/PostgreSQLIndex.cpp Sun Jan 06 12:48:18 2019 +0100 @@ -273,7 +273,7 @@ } -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 void PostgreSQLIndex::CreateInstance(OrthancPluginCreateInstanceResult& result, const char* hashPatient, const char* hashStudy, diff -r a2134531473c -r 2ee166f77501 PostgreSQL/Plugins/PostgreSQLIndex.h --- a/PostgreSQL/Plugins/PostgreSQLIndex.h Sun Jan 06 12:35:29 2019 +0100 +++ b/PostgreSQL/Plugins/PostgreSQLIndex.h Sun Jan 06 12:48:18 2019 +0100 @@ -83,7 +83,7 @@ return true; } -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 virtual void CreateInstance(OrthancPluginCreateInstanceResult& result, const char* hashPatient, const char* hashStudy, diff -r a2134531473c -r 2ee166f77501 PostgreSQL/UnitTests/PostgreSQLTests.cpp --- a/PostgreSQL/UnitTests/PostgreSQLTests.cpp Sun Jan 06 12:35:29 2019 +0100 +++ b/PostgreSQL/UnitTests/PostgreSQLTests.cpp Sun Jan 06 12:48:18 2019 +0100 @@ -439,7 +439,7 @@ } -#if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 +#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 TEST(PostgreSQLIndex, CreateInstance) { OrthancDatabases::PostgreSQLIndex db(globalParameters_);