diff OrthancServer/DatabaseWrapperBase.cpp @ 1761:f4286d99ee0a db-changes

fix sample database plugin
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 29 Oct 2015 11:22:48 +0100
parents 51db4a25a741
children b1291df2f780
line wrap: on
line diff
--- a/OrthancServer/DatabaseWrapperBase.cpp	Thu Oct 29 11:09:00 2015 +0100
+++ b/OrthancServer/DatabaseWrapperBase.cpp	Thu Oct 29 11:22:48 2015 +0100
@@ -695,10 +695,6 @@
 
     switch (type)
     {
-      case IdentifierConstraintType_Equal:
-        s.reset(new SQLite::Statement(db_, std::string(COMMON) + "d.value=?"));
-        break;
-
       case IdentifierConstraintType_GreaterOrEqual:
         s.reset(new SQLite::Statement(db_, std::string(COMMON) + "d.value>=?"));
         break;
@@ -711,8 +707,10 @@
         s.reset(new SQLite::Statement(db_, std::string(COMMON) + "d.value GLOB ?"));
         break;
 
+      case IdentifierConstraintType_Equal:
       default:
-        throw OrthancException(ErrorCode_ParameterOutOfRange);
+        s.reset(new SQLite::Statement(db_, std::string(COMMON) + "d.value=?"));
+        break;
     }
 
     assert(s.get() != NULL);