diff Framework/SQLite/SQLiteTransaction.h @ 237:35598014f140

refactoring to remove GlobalProperties.cpp
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 08 Apr 2021 19:09:04 +0200
parents ab96698c73a3
children 16aac0287485
line wrap: on
line diff
--- a/Framework/SQLite/SQLiteTransaction.h	Thu Apr 08 12:00:01 2021 +0200
+++ b/Framework/SQLite/SQLiteTransaction.h	Thu Apr 08 19:09:04 2021 +0200
@@ -35,6 +35,7 @@
   class SQLiteTransaction : public ITransaction
   {
   private:
+    SQLiteDatabase&               database_;
     Orthanc::SQLite::Transaction  transaction_;
     
   public:
@@ -60,5 +61,20 @@
 
     virtual void ExecuteWithoutResult(IPrecompiledStatement& statement,
                                       const Dictionary& parameters) ORTHANC_OVERRIDE;
+
+    virtual bool DoesTableExist(const std::string& name) ORTHANC_OVERRIDE
+    {
+      return database_.GetObject().DoesTableExist(name.c_str());
+    }
+
+    virtual bool DoesTriggerExist(const std::string& name) ORTHANC_OVERRIDE
+    {
+      return false;
+    }
+
+    virtual void ExecuteMultiLines(const std::string& query) ORTHANC_OVERRIDE
+    {
+      database_.GetObject().Execute(query);
+    }
   };
 }