changeset 73:aa81c1c80c75 db-changes

fix compatibility with older sdk
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 04 Jan 2019 17:06:34 +0100
parents 8dd29af7c844
children a4e440e65c68
files PostgreSQL/Plugins/PostgreSQLIndex.cpp PostgreSQL/UnitTests/PostgreSQLTests.cpp
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/PostgreSQL/Plugins/PostgreSQLIndex.cpp	Fri Jan 04 14:43:35 2019 +0100
+++ b/PostgreSQL/Plugins/PostgreSQLIndex.cpp	Fri Jan 04 17:06:34 2019 +0100
@@ -269,6 +269,7 @@
   }
 
 
+#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1
   void PostgreSQLIndex::CreateInstance(OrthancPluginCreateInstanceResult& result,
                                        const char* hashPatient,
                                        const char* hashStudy,
@@ -316,4 +317,5 @@
       result.seriesId = ReadInteger64(statement, 6);
     }
   }
+#endif
 }
--- a/PostgreSQL/UnitTests/PostgreSQLTests.cpp	Fri Jan 04 14:43:35 2019 +0100
+++ b/PostgreSQL/UnitTests/PostgreSQLTests.cpp	Fri Jan 04 17:06:34 2019 +0100
@@ -439,6 +439,7 @@
 }
 
 
+#if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1
 TEST(PostgreSQLIndex, CreateInstance)
 {
   OrthancDatabases::PostgreSQLIndex db(globalParameters_);
@@ -511,3 +512,4 @@
   ASSERT_NE(r1.seriesId, r2.seriesId);
   ASSERT_NE(r1.instanceId, r2.instanceId);
 }
+#endif