Commit a51fcf0a authored by Sebastien Jodogne's avatar Sebastien Jodogne
Browse files

New upstream version 3.2

parent ed942e11
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
repo: 7cea966b682978aa285eb9b3a7a9cff81df464b3
node: 3424a54ca2ee52448369fd249af954d225164e62
branch: OrthancPostgreSQL-3.1
node: 5c69c2a14c9703680df34ced9f6cb1a4c1e72dad
branch: OrthancPostgreSQL-3.2
latesttag: null
latesttagdistance: 112
changessincelatesttag: 124
latesttagdistance: 117
changessincelatesttag: 130
+11 −0
Original line number Diff line number Diff line
@@ -115,6 +115,12 @@ namespace OrthancDatabases
                         Orthanc::GlobalProperty property,
                         const std::string& utf8)
  {
    // This version of "SetGlobalProperty()" (with an explicit
    // transaction) is called internally by the plugin to set a global
    // property during the initialization of the database. (TODO:
    // Could be replaced by the version with an implicit transaction
    // to avoid code redundancy).
    
    if (db.GetDialect() == Dialect_SQLite)
    {
      Query query("INSERT OR REPLACE INTO GlobalProperties VALUES (${property}, ${value})", false);
@@ -164,6 +170,11 @@ namespace OrthancDatabases
                         Orthanc::GlobalProperty property,
                         const std::string& utf8)
  {
    // This version of "SetGlobalProperty()" (without an explicit
    // transaction) is called by Orthanc during its execution. Orthanc
    // manages the transaction at a higher level, but this transaction
    // is always present.

    if (manager.GetDialect() == Dialect_SQLite)
    {
      DatabaseManager::CachedStatement statement(
+5 −2
Original line number Diff line number Diff line
@@ -1847,10 +1847,13 @@ namespace OrthancPlugins
        sprintf(info, 
                "Performance warning: The database index plugin was compiled "
                "against an old version of the Orthanc SDK (%d.%d.%d): "
                "Consider upgrading to version 1.5.4 of the Orthanc SDK",
                "Consider upgrading to version %d.%d.%d of the Orthanc SDK",
                ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER,
                ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER,
                ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER);
                ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER,
                ORTHANC_OPTIMAL_VERSION_MAJOR,
                ORTHANC_OPTIMAL_VERSION_MINOR,
                ORTHANC_OPTIMAL_VERSION_REVISION);

        OrthancPluginLogWarning(context, info);
      }
+19 −6
Original line number Diff line number Diff line
@@ -65,9 +65,16 @@ namespace OrthancDatabases
      return false;
    }

    if (OrthancPluginCheckVersionAdvanced(context, 1, 5, 4) == 1)
    if (OrthancPluginCheckVersionAdvanced(context, 1, 4, 0) == 1)
    {
      ImplicitTransaction::SetErrorOnDoubleExecution(true);
    }

    if (OrthancPluginCheckVersionAdvanced(context,
                                          ORTHANC_OPTIMAL_VERSION_MAJOR,
                                          ORTHANC_OPTIMAL_VERSION_MINOR,
                                          ORTHANC_OPTIMAL_VERSION_REVISION) == 1)
    {
      isOptimal = true;
    }

@@ -110,9 +117,12 @@ namespace OrthancDatabases
        int minor = boost::lexical_cast<int>(tokens[1]);
        int revision = boost::lexical_cast<int>(tokens[2]);

        isOptimal = (major > 1 ||
                     (major == 1 && minor > 5) ||
                     (major == 1 && minor == 5 && revision >= 4));
        isOptimal = (major > ORTHANC_OPTIMAL_VERSION_MAJOR ||
                     (major == ORTHANC_OPTIMAL_VERSION_MAJOR &&
                      minor > ORTHANC_OPTIMAL_VERSION_MINOR) ||
                     (major == ORTHANC_OPTIMAL_VERSION_MAJOR &&
                      minor == ORTHANC_OPTIMAL_VERSION_MINOR &&
                      revision >= ORTHANC_OPTIMAL_VERSION_REVISION));
      }
    }

@@ -121,7 +131,10 @@ namespace OrthancDatabases
    {
      LOG(WARNING) << "Performance warning in " << dbms
                   << " index: Your version of Orthanc (" 
                   << context->orthancVersion << ") should be upgraded to 1.5.4 "
                   << context->orthancVersion << ") should be upgraded to "
                   << ORTHANC_OPTIMAL_VERSION_MAJOR << "."
                   << ORTHANC_OPTIMAL_VERSION_MINOR << "."
                   << ORTHANC_OPTIMAL_VERSION_REVISION
                   << " to benefit from best performance";
    }

+1 −1
Original line number Diff line number Diff line
@@ -200,7 +200,7 @@ namespace OrthancDatabases
      // "Although there is no libpq function for deleting a
      // prepared statement, the SQL DEALLOCATE statement can be
      // used for that purpose."
      //database_.Execute("DEALLOCATE " + id_);
      database_.Execute("DEALLOCATE \"" + id_ + "\"");
    }

    id_.clear();
Loading