diff Framework/Plugins/GlobalProperties.cpp @ 132:5c69c2a14c97 OrthancPostgreSQL-3.2

OrthancPostgreSQL-3.2
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 01 Mar 2019 12:51:37 +0100
parents 714c5d2bee76
children 4cd7e45b671e
line wrap: on
line diff
--- a/Framework/Plugins/GlobalProperties.cpp	Fri Mar 01 11:21:42 2019 +0100
+++ b/Framework/Plugins/GlobalProperties.cpp	Fri Mar 01 12:51:37 2019 +0100
@@ -115,6 +115,12 @@
                          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 @@
                          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(